Use continue within for loop - C Statement

C examples for Statement:for

Introduction

The continue statement causes the loop to restart and executes the next a round for loop.

Demo Code

#include <stdio.h> 
int main()/*  ww  w  .j  a v  a2 s  . c o  m*/
{ 
 int x; 
 for ( x = 10; x > 5; x-- ) { 
    if ( x == 7 ) 
      continue; 
     printf("\n%d\n", x); 
  }  //end for loop 
}

Result


Related Tutorials