Computer Science, asked by devyani595, 11 months ago

Write a program to find the sum of 10 elements of an array.

Answers

Answered by karniga8
0

Answer:

for finding the sum of 10 element we have to sum it

Answered by Soñador
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