Create a Program that Contains the Three Value-Returning Functions
User Generated
enwchgiw
Programming
Description
Write 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.
Test the program with the following four sets of data:
- 56, 78, 90
- 100, 85, 67
- 74, 32, 98
- 25, 99, 84
This question has not been answered.
Create a free account to get help with this and any other question!
24/7 Homework Help
Stuck on a homework question? Our verified tutors can answer all questions, from basic math to advanced rocket science!