In some programming situations, we want to take the control to the beginning of the loop, bypassing the statements inside the loop, which have not been yet executed. They keyword continueallows us to do this. When continueis encountered inside any loop, control automatically passes to the beginning of the loop.
#include <stdio.h>
#include <conio.h>
void main() {
int i=1;
clrscr();
for(i=1; i<100; i++) {
if(i>=10) {
continue;
}
printf("%d", i);
}
getch();
}
#include <conio.h>
void main() {
int i=1;
clrscr();
for(i=1; i<100; i++) {
if(i>=10) {
continue;
}
printf("%d", i);
}
getch();
}
Post a Comment