Question: 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,

  1. 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.
  2. 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!
  3. 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.
  4. 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!