Question: 26.4 Modular Programming Write a program that displays the sum, product or difference of two numbers entered from the keyboard. The program should be menu

26.4 Modular Programming Write a program that displays the sum, product or difference of two numbers entered from the keyboard. The program should be menu driven, asking the user for sp or d. The user should then be asked to enter two numbers and your program will display the appropriate result based on user's menu choice. Write the main function in the program as follows: Declare appropriate variables Call function display Menu that displays the menu of choices., reads the choice and returns the choice to main Call a function getData that receives two integer variables, asks the user for two integers and using passing by reference returns those values to main Call a function display that receives the user's choice, the two integers entered by the user. The function definition should contain a switch statement that uses the user's choice and the two integers passed to the function to calculate the appropriate result. The last line of the function should display the result. 293816.150 1062 LAB ACTIVITY 26.4.1: ModularProgramming 0/10 main.cpp Load default template... 1 #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
