Computer Science, asked by dasarichinnarao, 7 months ago

write an algorithm to find simple calculator​

Answers

Answered by jaat8860
2

Answer:

For a simple calculator one may follow the given algorithm

Step 1- Display messages like “press 1 for addition, 2 for subtraction, 3 for multiplication,4 for division”

Step 2- accept the choice from the user and store it in a variable (say choice)

Step 3- put choice in the switch as switch(choice)

Step 4- put the case accordingly like case 1 for addition, case 2 for subtraction and so on and store and print the result. Also give a default case for wrong choice

Explanation:

Hope It will be helpful to you ☺️

Similar questions