TikTok interview question

Code a calculator algorithm with mathematic inputs.