#include using namespace std; int main() { // An array containing 4 floating-point numbers used to store the grades // of up to 4 students float studentGrades[4]; // An array containing 4 strings used to store the name names of up to // 4 students string studentNames[4]; // First, read in the 4 students names and grades for (int count = 0; count < 4; count++) { cout << "Enter name of student " << count << ": "; cin >> studentNames[count]; cout << "Enter grade of student " << count << ": "; cin >> studentGrades[count]; } // break the output cout << endl << endl; // Output each students grade... Note that the counter starts at 0, and // ends at 3 double average, sum = 0; for (int index = 0; index < 3; index++) { cout << "Student: " << studentNames[index] << "\tGrade: " << studentGrades[index] << endl; sum += studentGrades[index]; } average = sum / 4.0; cout << endl << "The average grade is: " << average << endl; return 0; }