Machine Problem #5
With chapters 4 and 5, write a C++ program that returns a value for each of the branching statements in Machine Problem #4. The program will simulate the output.
Your task is to include functions in the program that will return each calculated value in MP #4.
Save the program as Machine Problem #5.
Sample Run:
Same as MP #4.
This time, you are required to build a function inside the program instead of executing the main body. You just have to call each calculated value by either call by parameter, call by reference, etc. Void functions may be applicable too.