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. thanks bro it worked for me ....keep it up.
View Tutorial          By: azhar at 2010-12-27 00:44:36

2. This program not running on my system so give some
View Tutorial          By: Ajay Kumar Barik at 2009-06-15 02:28:47

3. I did not understand it. please give one example e
View Tutorial          By: farhaan at 2008-03-20 12:06:11

4. one closing bracket ')' is required at while loop
View Tutorial          By: varsha Tambe at 2013-01-07 09:34:37

5. THANKS you for having this site. it help me a lot
View Tutorial          By: fermilita at 2012-01-04 11:45:53

6. really really very good
thanks all
a

View Tutorial          By: bade3 at 2010-01-01 18:52:15

7. when i was running this code... it is giving me th
View Tutorial          By: Nilesh Agrawal at 2012-06-08 15:08:25

8. can u plz send me the source code for employee sal
View Tutorial          By: prudhvi at 2013-01-27 13:47:12

9. please give example code with defined variable.
View Tutorial          By: shajjad at 2011-02-13 20:56:09

10. hi.I am new in j2me and really want to learn more.
View Tutorial          By: grace at 2010-10-25 10:40:32