Ok so im making a grade book program and i am slightly stuck i need to ask the user how many students they have grades for and then the name of the students along with the grades. I basically have the grade asking part down but i cant get it to loop around and ask the students name again. The output is supposed to look like this : Student Name: Donna walsh
score
score
score
student Name: John Summers
score
score
and so on and so forth.
My out put is coming out like so : Student Name: Donna walsh
score
Student Name: John summers
so its only allowing me to only input one score before going back to ask me the students name although it should allow me to read in at least 10.
[code]
for (int i = 0; i < MAX_VALUE; i++)
{
cout << "Please enter a number from 0 - 100 or type 999 to stop: ";
cin >> testScore;
if (testScore == 999)
break;
}
This is the loop i have going to read in grades, im not exactly sure where to put in the code to capture the name and format it like so.