Why do we need a loop. What task do I have to repeat?
Doubt in understanding this problem
hello @yashsharma4304
first u will given a character.
this character can be some operator if it is operator then read two operands ,print the result and continue the same procedure again (reading character then operator)
if character is x or X then simply stop execution.
if character is neither operator nor x/X then for such case print invalid operation and repeat the procedure.
check sample example for better understanding
Ok so the answer is printed in 1 case when the operator is given as input And program will stop only in 1 case when x or X is given otherwise we have to repeat the task. Right?
yeah correct… …
1 Like