Question: C program to determine the winners at a particular talent competition. There are five judges, each of whom awards a score between 0 and 100

C program to determine the winners at a particular talent competition. There are five judges, each of whom awards a score between 0 and 100 to each performer, a whole number. A performers final score is determined by dropping the highest and the lowest score received then adding the three remaining scores. The program does the following: 1. Reads names and scores from an input file into an array of structures. The first number in the input file represents the number of performers. Assume there are only one-word names. Here is an example: 2 John 70 78 71 79 75 David 83 29 98 92 97 2. Calculates the final score for each performer. 3. Sorts the array in descending order by the final score using the insertion sort algorithm. 4. Writes the sorted array to a file, in a table format with a header of your choice and data nicely aligned (strings to the left, numbers to the right). The output files name is created by adding out to the input files name. For instance, if the input files name is performers.txt, the output files name will be performersout.txt 5. Displays highest score, the winners names and scores. If two or more performers have the same highest score, all are considered winners. Display the output in a readable format of your choice. The Performer structure has three fields: name, a string of 31characters; scores, an array of five scores, and final, the final score. Read data from an input file named performers.txt. First create the input file: copy and paste the following data into a new text file: performers.txt John 7.0 7.8 7.1 7.9 7.5 David 8.3 2.9 9.8 9.2 9.7 Mary 8.3 8.0 8.9 7.9 8.5 Andy 9.1 8.9 9.0 8.7 9.1 Ann 9.0 8.8 9.1 9.7 9.3 Lucy 8.2 8.4 8.9 9.3 8.5 Dan 9.0 5.6 8.9 9.9 7.3 Sue 7.9 8.2 7.6 8.1 8.0

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!