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 have one textbox and three label.i want to parse
View Tutorial          By: Nara at 2011-08-01 06:16:07

2. Good one. Keep up the good work.
View Tutorial          By: zubair at 2012-02-23 10:18:36

3. Thank you... I have the same problem , I have date
View Tutorial          By: makoy at 2012-01-16 09:06:34

4. Good stuff and good example to support it.
View Tutorial          By: tabrez at 2012-04-10 01:44:48

5. please give some examples of postfix and infix.
View Tutorial          By: john mark at 2012-10-07 13:55:04

6. i am run code this rectify this error please some
View Tutorial          By: indiran at 2010-01-28 01:45:56

7. i m very glad to know and use this site. this is w
View Tutorial          By: Rupinder at 2009-09-08 08:49:23

8. Hi to all,

I worked on this project

View Tutorial          By: Ashish Agrawal at 2013-06-05 08:38:16

9. class Abc
{
public void display()
View Tutorial          By: Umapathi REddy at 2012-05-23 09:54:29

10. hi, IF ANY ONE REALLY INTRESTED TO RUN THIS PROGRA
View Tutorial          By: sunil kumar sahu at 2010-10-09 11:50:56