Example of continue in a loop
#include <stdio.h>
main ( )
{
int i;
for (i = 1; i < 10; i++)
{
if (i == 5)
{
continue;
}
printf (“%d”, i);
}
printf (“\n”);
}
OUTPUT:
1 2 3 4 6 7 8 9
Previous slide
Next slide
Back to first slide
View graphic version