More description

Input:

1

2

/

4

2

3

2

;

X

Why the output for this input case is an invalid operation?

Please provide more test cases/descriptions.

hello @omkarvp99

it was invalid because in input we have given this semicolon ->

as operator which is invalid.

u need to read a character , if it is x or X then immidiately u need to stop the execution.

if it is valid operator then u need to read two numbers as its operand and then print the result and repeat the same procedure again.

if it is invalid operator then print invalid operation and read the character again.

check this code for clarity->

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.