for loops for specified number of iterations
printf (“Enter the number of students: “);
scanf (“%d”, &numStudents);
/* we now “know” how many times to loop */
for (student = 1; student < numStudents; student++)
{
printf (“Enter grade: “);
etc.
}
Previous slide
Next slide
Back to first slide
View graphic version