Question: Important - Make sure to comment your code! Write a program that calculates the average of a group of test scores, where the lowest score
Important Make sure to comment your code!
Write a program that calculates the average of a group of test scores, where the lowest score in the group is dropped. Use and array or vector to store the numbers. It should use the following functions:
getScore should ask the user for a test score, store it in a reference parameter variable, and validate it This function should be called by main once for each of the five scores to be entered.
calcAverage should calculate and display the average of the four highest scores. This function should be called just once by main and should be passed the five scores.
findLowest should find and return the lowest of the five scores passed to it It should be called by calcAverage, which uses the function to determine which of the five scores to drop.
Input Validation: Do not accept test scores lower than or higher than
Output: Display to the user the scores entered, lowest score, scores counted, and average of the scores.
Example:
scores
Lowest score
Scores counted
Average is
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
