write an algorithm to find simple calculator
Answers
Answered by
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
Computer Science,
4 months ago
Hindi,
4 months ago
Science,
4 months ago
India Languages,
7 months ago
Math,
7 months ago
Computer Science,
1 year ago
Art,
1 year ago
Math,
1 year ago