Print int value under 10 using while loop - C Statement

C examples for Statement:while

Description

Print int value under 10 using while loop

Demo Code

#include <stdio.h> 
int main()/*from www  .  j a v a2 s.c  o m*/
{ 
   int x = 0; 
   while ( x < 10 ) { 
     printf("The value of x is %d\n", x); 
     x++; 
   }
}

Result


Related Tutorials