Programming Tutorials

Comment on Tutorial - while (1) Loops in C++ By Reema sen



Comment Added by : Jorgeus

Comment Added at : 2012-08-30 09:07:03

Comment on Tutorial : while (1) Loops in C++ By Reema sen
#include <iostream>
using namespace std;

//While loop

main()

{
int num=1;
while(num<=10)
{
cout<<num<<endl;
num++;
}
return 0;
}


Output:
1
2
3
4
5
6
7
8
9
10

Try this, it's very simple


View Tutorial