use while when a condition terminates your loop
the use of a sentinel is a good example...your program doesn’t “know” when the SENTINEL will be encountered
printf (“Enter grade: “);
scanf (“%d”, &grade);
while (grade != SENTINEL)
{
etc.
}
Previous slide
Next slide
Back to first slide
View graphic version