skip to main
|
skip to sidebar
C++ Tutorials
While Loop
Following program illustrate the use of while constructs.
// program to find sum of first 10 numbers
#include
void main()
{
int n,sum,n=1;
sum=0;
while(n<11)
{
sum=sum+n;
n=n+1;
}
cout<<"Sum of first 10 numbers is"<
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
My Blog List
Ask about web
How to set div beside each other ?
14 years ago
C++ Tutorials
Pointer to Members
14 years ago
C Programming
Masking
14 years ago
ASP.NET Tutorials
Difference between SGML, and XML
14 years ago
Linux Tutorials
Program for Palindrome
14 years ago
Visual Basic Tutorials
Code Editior Window
14 years ago
Java Program
Introduction of Java
14 years ago
Blog Archive
▼
2010
(35)
►
July
(24)
▼
May
(11)
Do - While Loop
While Loop
The Conditional Operator
The Break Statement
Switch Case Statement
If Statement
Manipulator in C++
Operators in C++
Variables in C++
Different between C and C++
Evolution of C++
No comments:
Post a Comment