subject

Write a complete c++ program that takes the judges’ scores for a gymnastic event and finds each contestant’s score. it should satisfy all the following specifications: it first reads in an integer n that gives the number of judges. it then reads in a contestant number followed by n integers which are the scores given the contestant by the n judges. the scores should be read into an array, then the program calls a function called findaveragescore that takes n and the array of judges’ scores as arguments. the function should find and drop the highest score and the lowest score, and then find and return the average of the remaining n-2 scores. the main should then print the contestant number and the average score s/he receives for the event to the screen. it will continue to do this (read in the contestant number, then the n integers, then print the contestant number and the calculated score on a new line) until a negative value is entered for the contestant number. the program will then print the contestant number who scored the highest. (you may assume no ties will occur.) all input will be from the keyboard and you may also assume that n will never be greater than 10 and never less than 3. you may format the output in any way as long as it is readable and correct, and you may assume all inputs are correct. sample output screen for a session (bold numbers are printed by the program, normal numbers are typed in by the user.)number of judges: 534 7 5 3 7 6contestant 34 628 8 5 8 10 7contestant 28 7.73 5 5 3 4 4contestant 3 4.-1contestant 28 had the highest score.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 19:30
2. fluorine and chlorine molecules are blamed fora trapping the sun's energyob forming acid rainoc producing smogod destroying ozone molecules
Answers: 2
question
Computers and Technology, 23.06.2019 19:30
Amitha writes up a one-page summary of a novel during her summer internship at a publishing company. when she reads over the page, she realizes she used the word “foreshadow” seven times, and she would like to reduce the repetition. which tool would best amitha solve this problem?
Answers: 3
question
Computers and Technology, 24.06.2019 13:50
What does code do? a creates a text box that says "solid black" b creates a black border of any width c creates a black border 1 pixel wide
Answers: 1
question
Computers and Technology, 25.06.2019 00:30
You are to write a series of steps that anyone could follow to solve the following three problems: 1. even odd a. assume that someone tells you a number (an integer number) b. you hear the number and respond with the word even or odd 2. average a. assume that someone tells you between 3 and 5 numeric values. b. you hear the numbers and respond with the average is some number 3. dog or cat a. explain to a child the differences between a dog and a cat. b. your explanation could be used by a child or anyone to distinguish the difference between a dog and a cat
Answers: 1
You know the right answer?
Write a complete c++ program that takes the judges’ scores for a gymnastic event and finds each cont...
Questions
question
Mathematics, 02.02.2021 19:40
question
Mathematics, 02.02.2021 19:40
question
Mathematics, 02.02.2021 19:40
question
Mathematics, 02.02.2021 19:40
question
Mathematics, 02.02.2021 19:40
Questions on the website: 13722363