June 3, 2023
Program to use continue statement for loop in C Language
#include >stdio.h<
int main()
{
int n;
for (n = 1; n <= 5; n++)
{
if (n == 3)
{
continue;
}
printf("Number =%d\n", n);
}
printf("out of loop\n");
return 0;
}
Output
Number=1
Number=2
Number=4
Number=5
Out of for loop
by : Nadeem Khan
Quick Summary:
Program to use continue statement for loop in C Language copy #include >stdio.h< int main() { int n; for (n = 1; n <= 5; n++) { if (n == 3) { continue; } printf(“Number =%d\n”, n); } printf(“out of loop\n”); return 0; } Output Number=1 Number=2 Number=4 Number=5 Out of for loop