Question: C++ Redo programming exercise using dynamic arrays. REFERENCE: Write a program that reads the number of students in the class, then reads each student's name
C++
Redo programming exercise using dynamic arrays.
REFERENCE: Write a program that reads the number of students in the class, then reads each student's name and his/her test score. Print out each student name, test score and grade, and the average score of the whole class. The program must use vectors and loops for the implementation (in this revision use dynamic array). The grades are determined as follows: A >= 90; 80 <= B < 90; 70 <= C < 80; 60 <= D < 70; F < 60. The code must use dynamic array this time. All the input formats are the same.
Example input:
5
Jack White 87
Nancy Johnson 89
Susan Miller 93
Henry North 91
Sean Don 85
Example output:
Jack White had a test score of 87 and a grade of B Nancy Johnson had a test score of 89 and a grade of B Susan Miller had a test score of 93 and a grade of A Henry North had a test score of 91 and a grade of A Sean Don had a test score of 85 and a grade of B The class average was 89
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
