Answers for "to find sum from a given 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

Code answers related to "to find sum from a given array"

Code answers related to "C"

Browse Popular Code Answers by Language