Question
I really need help with this assignment: question: In an international gymnastic competition, eachcontestant's score is calculated by dropping the lowest and highestscores and then adding the remaining scores. Write a program theatallows the user to enter a player's id followed by the nationalityand eight judges' scores. There are 5 contries entered for thiscompetition and each country is represented by one character. Thecountry codes are A for America, C for China, M for Mexico, B forBrazil, and F for France. a judge awards points between 1 and10, with 1 being a lowest and 10 being the highest. Format youroutput with two decimal places. requirements: 1. declare a named constant(global) for thearray size 2. no global variables areallowed 3. you must use a for loop for arrayprocessing 4. use a do-while loop for input errorchecking 5. use a switch statements when converting acountry character code to a string sample run: Enter the player id: 12 The player id must be between 111 and 999. Enter the player id: 134 Enter the country code: D Invalid country code. Enter the country code: A Enter a judge's score: 0.5 Score must be between 1.0 and 10.0 Enter a judge's score: 9.0 Enter a judge's score: 9.3 Enter a judge's score: 9.0 Enter a judge's score: 9.9 Enter a judge's score: 9.5 Enter a judge's score: 9.4 Enter a judge's score: 9.6 Enter a judge's score: 9.8 ******************************************************** American player 134 received 56.80 points. I really need help with this assignment: question: In an international gymnastic competition, eachcontestant's score is calculated by dropping the lowest and highestscores and then adding the remaining scores. Write a program theatallows the user to enter a player's id followed by the nationalityand eight judges' scores. There are 5 contries entered for thiscompetition and each country is represented by one character. Thecountry codes are A for America, C for China, M for Mexico, B forBrazil, and F for France. a judge awards points between 1 and10, with 1 being a lowest and 10 being the highest. Format youroutput with two decimal places. requirements: 1. declare a named constant(global) for thearray size 2. no global variables areallowed 3. you must use a for loop for arrayprocessing 4. use a do-while loop for input errorchecking 5. use a switch statements when converting acountry character code to a string sample run: Enter the player id: 12 The player id must be between 111 and 999. Enter the player id: 134 Enter the country code: D Invalid country code. Enter the country code: A Enter a judge's score: 0.5 Score must be between 1.0 and 10.0 Enter a judge's score: 9.0 Enter a judge's score: 9.3 Enter a judge's score: 9.0 Enter a judge's score: 9.9 Enter a judge's score: 9.5 Enter a judge's score: 9.4 Enter a judge's score: 9.6 Enter a judge's score: 9.8 ******************************************************** American player 134 received 56.80 points. sample run: Enter the player id: 12 The player id must be between 111 and 999. Enter the player id: 134 Enter the country code: D Invalid country code. Enter the country code: A Enter a judge's score: 0.5 Score must be between 1.0 and 10.0 Enter a judge's score: 9.0 Enter a judge's score: 9.3 Enter a judge's score: 9.0 Enter a judge's score: 9.9 Enter a judge's score: 9.5 Enter a judge's score: 9.4 Enter a judge's score: 9.6 Enter a judge's score: 9.8 ******************************************************** American player 134 received 56.80 points.
Explanation / Answer
please rate - thanks #include #include #define SIZE 8 using namespace std; int main() {int id,i; char country; double score[SIZE],sum=0,max=0,min=50; coutid; while(id999) {cout