C++ Program to Find Sum of 10 Numbers

C++ – Sum of 10 Numbers C Language Program Code

#include
#include
void main()
{
int a[10],i,sum=0;
clrscr();
cout<<"Enter the elements:n";
for(i=0;i<10;i++)
{
cin>>a[i];
}
for(i=0;i<10;i++)
{
sum=sum+a[i];
}
cout<<"Result is:"< getch();
}

Add Comment