Question: Write a C++ program to determine the winner of the Got Talent contest. The contest has five judges, each of whom awards a score between

Write a C++ program to determine the winner of the Got Talent contest. The contest has five judges, each of whom awards a score between 1 and 10 for each of the performers. Fractional scores are not allowed. A contestants final score is determined by dropping the highest and lowest scores received, then averaging the three remaining scores (the average should be rounded to two decimal places). The winner is the contestant with the highest average score. If there is a tie, the winner will be the first contestant judged.

Requirements:

1. Input the contestants first name followed by the 5 judges scores. You do not know how many contestants there are. Design the loop so the loop terminates when you are finished entering contestants.

2. Input validation: Do not accept a judges score that is less than 1 or greater than 10. As each score is entered send the score to a function to test the scores validity.

3. Use function calcAvgScore that has the contestants 5 scores as input parameters a. returns the average score for that contestant. b. Calls two functions, findLowest and findHighest which both accept the 5 scores as input parameters and return the lowest and highest scores, respectively.

4. Do not use global variables. All variables used in the functions must be passed as parameters or declared locally.

5. At the end of the program, display the winner and winning score (rounded to 2 decimal places).

I got as far as the end of the program, however, I can't seem to display the winner's name. Can't use vectors or arrays, functions have to do it.

Write a C++ program to determine the winner of the Got Talent

Enter the name of the star, enter Done if there are no stars eorge Enter judge 1 score 7? Invalid score entered, please enter scores between 1 and 10 Enter correct score Invalid score entered. please enter scores between 1 and 10 Enter correct score 6 Enter judge 2 score ? Enter judge 3 score 8 Enter judge 4 score 6 Enter judge 5 score 7 Enter the name of the star, enter Done if there are nore stars Martha Enter judge 1 score 10 Enter judge 2 score 9 Enter judge 3 score 8 Enter judge 4 score 9 Enter judge 5 score 18 Enter the name of the star, enter Done if there are nore stars Leela Enter judge 1 score 7 Enter judge 2 score 9 Enter judge 3 score 8 Enter judge 4 score 9 Enter judge 5 score 8 Enter the name of the star, enter Done if there are nore stars one and the winner is Marrtha with a score of 9.33

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!