Question
Exercise 1 Write a program that always prints a menu of five options: addition, subtraction, multiplication, division of two numbers, or quit the program. If
Exercise 1 Write a program that always prints a menu of five options: addition, subtraction, multiplication, division of two numbers, or quit the program. If user chooses (enters) for example 1 (addition), the program will ask him to enter two numbers that the program will add to each other and prints the result. Then, the menu options are printed again and so on If user enters 5 (quit), the program will stop. Below an example of execution, (users input is in red): ****Welcome to calculator**** ***Your options are:*** 1) Addition 2) Subtraction 3) Multiplication 4) Division 5) Quit calculator Choose your option:
1 Add this: 3 to this:4 3 + 4 = 7 ****Welcome to calculator**** ***Your options are:*** 1) Addition 2) Subtraction 3) Multiplication 4) Division 5) Quit calculator Choose your option: 2 Subtract this:6 from this: 9 9 - 6 = 3 ****Welcome to calculator**** ***Your options are:*** 1) Addition 2) Subtraction 3) Multiplication 4) Division 5) Quit calculator Choose your option: 5 ***** End of the program calculator *****
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started