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
code needed in C++

User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

This question has not been answered.

Create a free account to get help with this and any other question!

Related Tags