Question: Week 5 - Homework Program Write a program to compute and display sum or product of two interers, entered by the user. The following are
Week 5 - Homework Program Write a program to compute and display sum or product of two interers, entered by the user. The following are prototypes for the functions to be used in the program (DON'T change these!): void displayintro): I/ displays information about what the program is going to do be sure to end with a double space int getNumber I gets one number from the user: NOTE: This function will be caled twice: once for each of the two numbers to be used in the operation going into two different variables) char getOperations prompts the user to enter for addition or for multiplication. There should be data validation in this function, so the user will have to repeat the entry if a plus or times isnt entered in the main function, there should be a switch structure after all input is received, so the correct answer is produced. NOTE: NO OUTPUT should be done inside the switch structure. The answer computed in the switch structure should be displayed at the end, as an expression . 2. 4 - 6) NOTE: There should be exactly 4 variables: 3 integers and one char Activate Window
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
