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 fra
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 fra