Basic calculator


please explain what m i doing wrong?

hi @thakur0_0 as you can see from the sample input, if an invalid character is provided, such as ; then no numbers follow it. But you are taking 2 number inputs in the beginning itself. You need to take input of numbers ONLY if the operation is valid.
Also, you can use a switch case in this question.

1 Like

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.

1 Like