Answer:
Continue
Statement:
The continue statement skips some statements inside
the loop. The continue statement is used with decision making statement such as
if...else.
General of continue Statement:
continue;
continue statement work:
Program:
#include<stdio.h>
#include<conio.h>
void main () {
clrscr();
int i;
for(i=10;i<20;i++) {
if(i==15)
continue;
printf("value of: %d\n",i);
}
getch();
}
Simple
Output:
value
of: 10
value
of: 11
value
of: 12
value
of: 13
value
of: 14
value
of: 16
value
of: 17
value
of: 18
value
of: 19
Break Statement:
The break statement terminates the loop immediately
when it is encountered. The break statement is used with decision making
statement such as if...else.
General of break statement:
break;
Break statement works:
Program:
#include<stdio.h>
#include<conio.h>
void main() {
clrscr();
int i;
for(i=10;i<20;i++) {
if(i>15) {
break;
}
printf("value
of: %d\n",i);
}
getch();
}
Simple
Output:
value
of: 10
value
of: 11
value
of: 12
value
of: 13
value
of: 14
value
of: 15