Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In C language please, Get the user's first name and store it to a char array Declare a character array to hold at least 20
In C language please,
- Get the user's first name and store it to a char array
- Declare a character array to hold at least 20 characters.
- Ask for the user's firstname, and store the name into your char array.
- Get 5 test scores from the user :
- Declare an array of 5 floating point elements.
- Use a for loop to get the user's 5 scores.
- Assume that all scores are out of 100. You are not required to request the maximum score.
- Assume that the user input is valid. You are not required to validate user input.
- Your prompts should print out which test score you are asking for:
- Example: "What is the score of test #1?" ... "What is the score of test #3?"
- Warning: Be careful of your array indexes!
- Calculate the average test score:
- Use a for loop to calculate the sum of all examinations.
- Divide the sum by 5 to get the average and store this data in another variable.
- Print the summary for the user similar to:
- "Hello Charley, based on your test scores of 80, 75, 90, 85 and 100, your average is 86.00% with letter grade of an 'B'"
- You should re-use your previous code to calculate the grade letter from the average percentage.
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