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. i am converting from Visualbasic 6 to java web app
View Tutorial          By: Qui at 2010-01-05 07:26:07

2. http://www.java-samples.com/showtutorial.php?tutor
View Tutorial          By: Prab at 2009-04-13 11:54:17

3. i dont understand
View Tutorial          By: amabelle pascual at 2014-01-09 23:47:14

4. Please provide some more examples ...It will be ve
View Tutorial          By: it interview questions at 2012-09-29 05:07:55

5. sir ji,
i want do learn for loop in java an

View Tutorial          By: Prabhakar at 2009-11-06 00:48:53

6. Like every other Java recursion example, this exam
View Tutorial          By: Uriah at 2010-05-08 18:59:16

7. Hi Shruti, If you have better samples then feel fr
View Tutorial          By: jagan at 2010-03-03 19:42:46

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

9. This is really helpful, i'm planning to also add a
View Tutorial          By: JhunZhen at 2011-07-09 21:42:32

10. I did this exactly.
In my case, the fix.php

View Tutorial          By: Manorasa at 2010-06-29 23:32:24