Write a program to find the sum of 10 elements of an array.
Answers
Answered by
0
Answer:
for finding the sum of 10 element we have to sum it
Answered by
2
Answer:
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a,s=0;
for(int i=0;i<10;i++)
{
cout<<"\nEnter any number";
cin>>a[i];
}
for(i=0;i<10;i++)
{
s=s+a[i];
}
cout<<"\nSum of 10 numbers is"<<s;
getch();
}
Similar questions