Problem

In this exercise, you create a program that calculates the average of three test scores....

In this exercise, you create a program that calculates the average of three test scores. The program should contain three value-returning functions: main, getTestScore, and calcAverage. The main function should call the getTestScore function to get and return each of three test scores. The test scores may contain a decimal place. The main function then should call the calcAverage function to calculate and return the average of the three test scores. When the calcAverage function has completed its task, the main function should display the average on the screen. Display the average with one decimal place. Hint: The main function will need to call the getTestScore function three times.

a. Create IPO charts for the problem, and then desk-check the algorithm using the following four sets of test scores: 56, 78, 90; 100, 85, 67; 74, 32, 98; 25, 99, 84. b. List the input, processing, and output items, as well as the algorithm, in a chart similar to the one shown earlier in Figure 9-52. Then code the algorithm into a program.

c. Desk-check the program using the same data used to desk-check the algorithm.

d. If necessary, create a new project named Advanced23 Project and save it in the Cpp7\Chap09 folder. Enter your C++ instructions into a source file named Advanced23.cpp. Also enter appropriate comments and any additional instructions required by the compiler.

e. Save and then run the program. Test the program using the same data used to desk-check the program.

REFERENCE : FIGURE 9-52

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search