Computer Science, asked by ritha2, 1 year ago

to show sum of first 10 numbers in c++

Answers

Answered by Anonymous
2
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int sum,i;
cout <<"Write 10 numbers to get their sum";

for( i =1 ; i ≤ 10 ; i++)
cin>>i;

cout<<"/n/n Entered numbers are : " <<endl <<i;

sum = 0 ;
sum = sum+i;
cout << "Sum of entered numbers is :- "<<sum;
getch();
}
Similar questions