Question: language C++ Part A - Calculator Operation Develop and execute a program that includes the following: main() performs the following: o Write menu of options

language C++

language C++ Part A - Calculator Operation Develop and execute a program

Part A - Calculator Operation Develop and execute a program that includes the following: main() performs the following: o Write menu of options to terminal and prompt the user to specify calculator operation and input two numbers to use in specified calculator operation o Call function to carry out calculator operation. The function prototype is given by: bool calculate(int, double, double, double &); A possible illustration of the calculator program execution is shown in the following. EECE1080C/CS1021C Lab Functions 1 Topics covered: CH Program Development, Functions MENU 1. Add 2. Subtract 3. Multiply 4. Divide Enter your choice: 1 Enter your two numbers: 12 15 Result: 27 Continue? y The program asks the user to decide whether they want to continue the operation. If the user inputs 'y', the program will prompt the user to choose another operation. Otherwise, the program will terminate For division, the function must check that the denominator != 0. If it zero, then the function must terminate and return false; otherwise, compute the division and return true. For the remaining three operations, the function always returns true. TESTING - Test your code using the specified calculator operations and complete the following table (NOTE - this table is for your use only. It need not be submitted for grading): Operation Input Values Actual Results Code Results 1 - Add 100, 200 300 ? 2 - Subtract 100, 200 - 100 3 - Multiply 10, 20 200 ? 4 - Divide 25, (25/0) Error

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!