Gymnastics Competition
Gymnastics Competition
A Gymnastics competition uses one of two methods for calculating the gymnasts score. The competition utilized either three judges or five judges. Write a program to ask which scoring method is utilized and how many competitors are in the competition. Then input the scores from the judges, and calculate the average score for a contestant. Use the following algorithm as a guide.
Algorithm
Display a welcome message to the user.
Display a menu to the user with options for three judges, five judges or quit. If a user enters an option that is not on the menu, display a user-friendly error message and allow the user to try again. Use a string constant for the error message.
If the competition utilizes three judges, ask how many gymnasts are in the competition. Validate that the number is between 1 and 20. For each gymnast, ask the user to input the contestants name and the three scores. A score must be between 0 and 10 and fractional scores such as 6.5 are allowed. If a user inputs an invalid score, present a user-friendly error message and allow the user to try again. A contestants final score is determined by calculating an average of the three scores. Use a constant string for the error message. Display the contestants name and average score in a user-friendly format.
If there are five judges, ask how many gymnasts are in the competition. Validate that the number is between 1 and 50. For each gymnast, ask the user to input the contestants name and input the five scores. A score must be between 0 and 10 and fractional scores such as 6.5 are allowed. . If a user inputs an invalid number, present a user-friendly error message and allow the user to try again. A contestants final score is determined by dropping the highest score and lowest score, then averaging the three remaining scores. Use a constant string for the error message. Display the contestants name and average score in a user-friendly format.
Ask the user if she wishes to run the program again. Depending on the answer, show the menu again or end the program.
DO NOT USE ARRAYS/FUNCTIONS
You can place an order similar to this with us. You are assured of an authentic custom paper delivered within the given deadline besides our 24/7 customer support all through.
Latest completed orders:
# | topic title | discipline | academic level | pages | delivered |
---|---|---|---|---|---|
6
|
Writer's choice
|
Business
|
University
|
2
|
1 hour 32 min
|
7
|
Wise Approach to
|
Philosophy
|
College
|
2
|
2 hours 19 min
|
8
|
1980's and 1990
|
History
|
College
|
3
|
2 hours 20 min
|
9
|
pick the best topic
|
Finance
|
School
|
2
|
2 hours 27 min
|
10
|
finance for leisure
|
Finance
|
University
|
12
|
2 hours 36 min
|