TikTok Interview Question

Code a calculator algorithm with mathematic inputs.