Tuesday, March 13, 2012

Program using while loop

while loop: while loop is entry control loop,means condion is check at the time of entring in loop....
body of loop is not executed if the condiotio is false. 
*************<soeasyprograms.blogspot.in>************/
#include<iostream.h>
#include<conio.h>
// Program using while loop

int main()
{
  int x = 0;  // Don't forget to declare variables
 
  while ( x < 10 ) { // While x is less than 10
    cout<< x <<endl;
    x++;             // Update x so the condition can be met eventually
  }
return 0;
}
/*************<soeasyprograms.blogspot.in>************/

No comments:

Post a Comment