// Here we cleaned up using arrays. // References: "Repeating One or More Statements." // "Storing Multiple Values in Arrays." #include #include void main(void) { float grade_array[7] = {10, 7, 9, 3, 8, 7, 8}; //Declares 7 storage locations int student; //The student number or index // see what are the good students for (student=0; student<7; student++) { cout << "Student " << student << " has grade " << setw(2) << grade_array[student] << "."; if (grade_array[student] > 7) cout << " Good work!"; cout << endl; } }