Basic Calculator

my code works fine on vscode but not on ide why and highlight mistake.

code:- https://ide.codingblocks.com/s/441658

ques:- https://online.codingblocks.com/app/player/189104/content/180067/4806/code-challenge

Hello @dasvishal60 corrected code:

is there any efficient way to do this ques because we need to use cin>>n1>>n2 again and again and when I run previous code in vscode it works absolutely fine there but not in online ide any reason??

check this code also I have used switch statement but facing same problem
code:- https://ide.codingblocks.com/s/441743

@dasvishal60 you have to use cin>>n1>>n2 in that only because if thereis character like X or x just after any character then it will be error.
and the code which you have shared is running fine.

check other code also

this code is working fine

but it didn’t pass the test case

check now:

@dasvishal60 do you have any query?

NOT regarding to this question

@dasvishal60 yes what is your query then?
if it is not regarding to this then you have to raise the doubt again.

yeh i know but first trying to solve by myself XD.

@dasvishal60 if you feel that your doubt is cleared in this question then you can mark this as resolved.

i did but its not updated

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.