Question: Need help writing this program. Nothing too complicated like vectors. Can use arrays, all results must be printed to file Write a C++ program that
Need help writing this program. Nothing too complicated like vectors. Can use arrays, all results must be printed to file
Write a C++ program that reads a students name followed by 20 numeric grades (integers) from an input file containing a unknown number of data records. Compute the average grade after dropping the lowest grade. Also print the name and average of the students with the highest and lowest average at the end of the grade report (see sample output below). Write your program so that it is scalable, for instance if the number of grades is increased or decreased, I should only have to change one constant value ( const num_of_grades = 20).
Assign letter grades via the scale below:
A 90 100 B 80 -- 89 C 70 79 D 60 -69 and F 0 - 59
Input format:
Sam 100 90 87 23 12 67 95 29 29 29 10 20 19 17 82 72 72 62 72 93
Mary 30 20 90 90 90 90 88 29 29 29 10 20 19 17 82 72 72 62 72 90
Mark 80 90 80 80 90 87 100 29 29 29 10 20 19 17 82 72 72 62 72 90
Output file format:
>>>>>>>>>>>>>>>>>> GRADE REPORT <<<<<<<<<<<<<<<<<
Student Letter Numeric
Name Grade Average
Sam C 79.99
Mary A 90.99
Mark B 89.99
The student with the highest average is Mary (90.99)
The student with the lowest average is Sam (79.99)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
