Question
Write a program in C that will allow the user to enter and display data about a single sports athlete. The program should keep track
Write a program in C that will allow the user to enter and display data about a single sports athlete.
The program should keep track of the following quantities for a single athlete:
- First Name A single string with a maximum of 32 characters.
- Middle Initial A single character and can be null.
- Last Name A single string with a maximum of 32 characters.
- Suffix A string of at most 3 characters and can be null.
- School A string from 2 to 64 characters.
- State two-character abbreviation for home state (e.g. AL, SC) to be chosen from a list provided.
- Class Two or three characters FR, SO, JR, SR, GRor RFR, RSOetc. if a Redshirt.
- Position A string of at most 3 characters. All must be capital letters.
- Stars An integer 0 to 5 for recruit rating. Should displays as *** for three stars, etc.
- Age An integer from 21 to 99 years, inclusive.
- Sex A single character, M or F.
- Height Two integers: feet from 5 to 7, inclusive, and inches, from 0 to 11, inclusive.
- Weight An integer from 100 to 500 pounds, inclusive.
- Twitter Account: a string with a maximum of 15 characters. Ampersand must be first character entered and is shown when displayed, e.g. @AtheleteName)
- Phone Number: a ten-digit number input and displayed as (444)555-6666.
Initially all quantities should be "unknown" and should display that when asked.
The program should have eight input options on its menu.
|
|
The program should allow the user to select any one option at a time and an error displayed if an invalid option has been chosen. The program should prompt for the appropriate data. The program should only display data if that option is selected. When it is selected, the program should print all data indicating whichif anydata is unknown.
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