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



Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1.
View Tutorial          By: pmprash at 2009-12-22 01:15:33

2. Hi, I don't have any GSM modem. Will it work if I
View Tutorial          By: Arif at 2008-10-09 11:29:14

3. Hi,

I am using this code and gettin

View Tutorial          By: Akanksha at 2014-01-20 10:31:31

4. Hi, i am newly in java,please send me on sample pr
View Tutorial          By: aruna.k at 2012-12-13 06:05:44

5. Can anybody tell me how to send and receive SMS us
View Tutorial          By: Bharat Lahori at 2010-02-04 07:14:19

6. Any Solution for below Error,

*** t

View Tutorial          By: Mazher at 2009-08-02 02:08:52

7. Great Article...thanks :)
View Tutorial          By: Paras Chawla at 2012-10-28 04:35:57

8. i want a java code to make a GUI in netbeans and s
View Tutorial          By: siddharth at 2012-03-17 09:59:59

9. Very good basic example. Thanks a lot.............
View Tutorial          By: satish at 2010-04-15 05:39:41

10. Puedes enviarme ese codigo, ando embolatado
View Tutorial          By: Wilson at 2011-10-26 22:45:38