how to proceed till the end
Basic calculator problem qestion
hey @royprincejmp, consider the below explanation
1.Take the first input as ch
2. Now make use of a while loop which will iterate for each input till the input is not βXβ or βxβ:
while(ch!=βXβ || ch!=βxβ){}
3. Inside the while use if else conditional statements:
if ch == β+β:
Take two more inputs n1 and n2 (as integers) and print the addition
repeat this for β-β, β*β, β/β, and β%β
for any other input you can use else statement:
Print βInvalid operation. Try again.β inside that
hey @royprincejmp, you can take input inside the while loop.
Take idea from this code https://ide.codingblocks.com/s/95379?_ga=2.27757237.808261274.1565180155-405277467.1563719560
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.