All articles
c

A program to explain unconditional statement CONTINUE

Share this article

Share on LinkedIn Share on X (formerly Twitter)

C Programming Language 040

The following code shows how to write a program to explain unconditional statement CONTINUE inside a for loop.

Program

#include <stdio.h>
 
void main()
{
    int i;
    for (i = 0; i <= 10; i++)
    {
        if (i <= 5)
        {
            continue;
        }
        printf("%d\n", i);
    }
 
    printf("\n");
}

Result

6
7
8
9
10

Comments