Question
Write a program that will read in three grades for a student whose first name must also be provided to the program and stored as
Write a program that will read in three grades for a student whose first name must also be provided to the program and stored as a character array (of maximum size 15). Ensure that each input grade for each student falls between 0 and 100. For this student, the average grade will be sent into a function that determines a letter grade based on the numerical average.
The function prototype should be: char letterGrade(double avgGrade); Do not use plus or minus grades, but have the following possibilities:
A > 89
<= 89 B > 79
<= 79 C > 69
<= 69 D > 59
59 >= F
Sample Output
This program assigns letter grades to a student based on average performance.
Enter the name of the student:
John
Enter grade 1 for John: 90
Enter grade 2 for John: 90
Enter grade 3 for John: 95
The letter grade for John is: A
Evaluation
20 points The program compiles, and is a reasonable attempt at the solution that incorporates all the required elements indicated: string inputs, functions, etc.
10 points The letter grade, based on the average grade, is correctly determined and displayed
5 points The output is well-formatted with regard to spacing and new lines
5 points The code is well-formatted with regard to indentations and reasonable comments
NB. Your program must make use of the function prototype described above in order to obtain a passing grade.
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