sahajjain01

Print first 10 natural numbers using while loop.

Aug 4th, 2013
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.20 KB | None | 0 0
  1. //Program to print first 10 natural numbers using while loop.
  2. #include<iostream.h>
  3. #include<conio.h>
  4. void main()
  5. {
  6.     clrscr();
  7.     int a=0;
  8.     while(a<10)
  9.     {
  10.         ++a;
  11.         cout<<a<<endl;
  12.     }
  13.     getch();
  14. }
Advertisement
Add Comment
Please, Sign In to add comment