0
Write a program in c++ to find the sum of array
Please help fast i have school in 1 hour!!
2 Respostas
+ 3
//int size = the size of your array.
//myArray is your array's name.
int sum = 0;
for(int x = 0; x < size; x++)
sum += myArray[x];
+ 1
int sum=0;
for(int i=0; i<array.size(); i++){
.sum+=array[i];
}
cout<<sum;