Question
Write a C++ program that reads a list of double-precision grades from the keyboard into an array named grade. The grade are to be counted
Write a C++ program that reads a list of double-precision grades from the keyboard into an array named grade. The grade are to be counted as the're read, and entry is to be terminated when a negative value has been entered. After all grades have been input, your program should find and display the sum and average of the grades. The grades should then be listed with an asterik(*) placed in front of each grade that's below the average.
b. Extend the program written for Exercise a to display each grade and its letter equivalent, using the following scale:
Between 90 and 100 = A
Greater than or equal to 80 and less than 90 = B
Greater than or equal to 70 and less than 80 = C
Greater than or equal to 60 and less than 70 = D
Less than 60 = F
- Create the following functions
char convertGrade(double); - Takes one grade and
sends back corresponding letter grade.
int loadGrades(double []); - Loads grades and
returns number loaded.
double getSum(double [], int); - adds up all grades
and returns.
Enter a Negative Number to Quit Enter Grade #1: 67 Enter Grade #2: 95 Enter Grade #3: 85
Enter Grade #4: 79 Enter Grade #5: 84 Enter Grade #6: 99 Enter Grade #7: 80 Enter Grade #8: -1 Loaded 7 Grades...
Sum 589.0 Average 84.1
Grades...
*67.0 D
95.0 A
85.0 B
*79.0 C
*84.0 B
99.0 A
*80.0 B
Press any key to continue . . .
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