Pages
HOME
DEVELOPERS
PROJECTS
PROGRAMS
TUTORIAL
DATA STRUCTURE & ALGORITHM
HELP
Program to add 10 integer numbers from 1 to 10 using while loop
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int x=1,n=10,sum=0;
while(x<=n)
{
sum=sum+x;
x++;
}
cout<<"TOTAL is "<<sum;
getch();
}
Newer Post
Older Post
Home