Answers for "calculate the sum of integers in an array"

C
0

how to find sum of array

//C++
int arr[5]={1,2,3,4,5};
int sum=0;
for(int i=0; i<5; i++){sum+=arr[i];}
cout<<sum;
Posted by: Guest on May-29-2020
0

array values sum

$a = array(5,15,25);
echo array_sum($a);
Posted by: Guest on October-22-2021

Code answers related to "calculate the sum of integers in an array"

Code answers related to "C"

Browse Popular Code Answers by Language