Question
Need this in C# based on the following pseudocode Your mission: The state diving commission wants to computerize the scoring at its diving competitions. You've
Need this in C# based on the following pseudocode
Your mission: The state diving commission wants to computerize the scoring at its diving competitions. You've been hired to write a program to automate the scoring of dives. Following are the requirements for the program.
After each dive, the user will be prompted to enter the:
diver's name;
diver's city;
degree of difficulty (ranges from 1.00 to 1.67); and
scores from five judges (scores can range from 0 to 10).
If an invalid score is entered, an error message will be displayed. The user will be prompted for the score repeatedly until a valid score is entered.
The program will then display the following information:
Diver's name
Diver's city
Dive final score: This is calculated by dropping the highest and lowest of the five judges' scores. The remaining three scores are added together, and the result is divided by 3 and then multiplied by the degree of difficulty.
The program will then prompt the user if she/he wants to process another dive. The user can type "Y" or "y" to continue, and "N" or "n" to quit.
Declare and initialize variables: name, city, judge score, highest score, lowest score, total score Loop while there are dives to process Initialize highest score and lowest score and total score Get diver's name and city Get degree of difficulty Loop to validate input Use a while loop to enter the degree of difficulty again if not in the proper range End Loop Loop five times to get judges' scores Ask for and enter a judges score Loop to Validate input use a while loop to input another score if it is not between 0 and 10 End Loop Update highest and lowest scores if need be If score is greater than highest assign score to highest If score is less than lowest assign score to lowest Increment the judgeCount variable Add score to total score End Loop Calculate the final score (subtract highest and lowest scores from total score, divide by 3, multiply by degree of difficulty) Display the diver's information and final dive score Prompt the user if he or she wants to process another diver End-Loop
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started