must compile You are to write a C++ program which reads and computes grades for
ID: 3633474 • Letter: M
Question
must compileYou are to write a C++ program which reads and computes grades for a class of students.the main function will operate by calling user-defined functions to process 1 student at a time. Here is a skeleton program:
#include <iostream>
#include <string>
using namespace std;
int main()
{
string first, last;
int test1, test2, test3, test4;
double average;
char grade;
//
// Read data for one student at a time until read_grades returns false
//
while ( read_grades ( first, last, test1, test2, test3, test4 ) ) {
// Compute the average from the 4 test grades
average = compute_average ( test1, test2, test3, test4 );
// Determine the letter grade from the average:
// A if average >= 89.5
// B if 79.5 <= average < 89.5
// C if 69.5 <= average < 79.5
// D if 59.5 <= average < 69.5
// F if average < 59.5
grade = letter_grade ( average );
// Print the student's name, grades, average and letter grade
report_grade ( first, last, test1, test2, test3, test4, average, grade );
}
return 0;
}