Write a C++ program to determine the winner of the Sinclairs 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:
- 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.
- 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.
- Use function calcAvgScore that has the contestants 5 scores as input parameters
- returns the average score for that contestant.
- Calls two functions, findLowest and findHighest which both accept the 5 scores as input parameters and return the lowest and highest scores, respectively.
- Do not use global variables. All variables used in the functions must be passed as parameters or declared locally.
- At the end of the program, display the winner and winning score (rounded to 2 decimal places).
Sample Output:
Submit:
Zipped folder named LastNameFirstNameCIS1111NameOfAssignment which contains:
- Your .cpp file
- Screen shots of your code and output
Reviews
There are no reviews yet.