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. Simple file writer example. .............
<

View Tutorial          By: Chezhian TK at 2010-10-14 21:40:16

2. Just what I was looking for. Great work. thx.
View Tutorial          By: SP Goh at 2008-03-24 01:09:09

3. I need a sample jsp(using Struts html tags) in thr
View Tutorial          By: Anil Kumar at 2008-10-23 04:14:51

4. Abstract class example is good, What is the differ
View Tutorial          By: megakumar at 2011-04-10 04:15:10

5. I am getting this error with Minecraft; Feed the B
View Tutorial          By: LadyKianna at 2013-03-11 05:52:54

6. Hi divya, You will have to edit the SerialParamete
View Tutorial          By: Ramlak at 2008-04-27 05:54:47

7. i am not sure of this line(depends on your jvm) ,
View Tutorial          By: vpeddi at 2010-03-20 07:20:19

8. Great example. To reset the initial value on readb
View Tutorial          By: Bala at 2014-07-22 04:48:34

9. no output as well, i'm getting portlist and portId
View Tutorial          By: raul at 2015-10-09 20:05:02

10. HI All,

I am using this code but fo

View Tutorial          By: muna at 2015-07-04 12:28:15