In C++, Complete a program that allows the user to choose addition or subtraction operations on two numbers entered from the keyboard. Code getChoice as a function that returns choice, addition and subtraction as functions that accept the two numbers as parameters and return the results of the calculations, and displayResult as a void function that accepts the result as a parameter. Be sure to put your name as a comment at the beginning of your code and at the end as the programmer. Please enter 1 if you want to add two numbers
enter 2 if you want to subtract two numbers 2
Please enter two numbers 4.65 9.2
The result is -4.55
Programmer: insert your name here
IMPORTANT: Notes that requirement in this homework:
Code should follow the flowchart design exactly.
Note that the two numbers are prompted for and entered in the main function
Use prototypes for your functions and code the function definitions AFTER main
Check your code with several numbers to see if correct results are produced
Do NOT use loops
No input validation is required

Respuesta :

ACCESS MORE