Monday, 12 July 2010

Simple example program on do while loop

#include <stdio.h>

void main () {

   /* local variable definition */
   int a = 5;

   /* do loop execution */
   do
   {
      printf("value of a: %d\n", a);
      a = a + 1;
   }while( a < 10 );
 }

You may like the following posts:
Loops
 Do..while loop
Statements

No comments:

Post a Comment