Question: (d) Write a C++ program that will display a calculator menu as shown below. The program should prompt the user to choose the operation choice

 (d) Write a C++ program that will display a calculator menuas shown below. The program should prompt the user to choose the

(d) Write a C++ program that will display a calculator menu as shown below. The program should prompt the user to choose the operation choice (from 1 to 5). The program should then ask the user to input two integer values for the calculation. The program should also ask the user to decide whether he/she wants to continue the operation. If he/she input y, the program will prompt the user to choose the operation again. Otherwise, the program should terminate. MENU 1 Add 2. Subtract 3. Multiply 4 Divide 5. Modulus Enter your choice1 Enter your two numbers 12 15 Result 27 Continuo?y The answer should include the following: 1. Appropriate function definitions based on the following prototypes; void displaymenu(); int Add(int a int b); int Subtract(int a, int b); int Multiplyint a, int b); float Divide(int a, int b); int Modulus(int a, int b); ii. Use of switch statement as appropriate. ii. Use of explicit type casting as appropriate. (15 marks)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!