summaryrefslogtreecommitdiff
path: root/testapp/docs/array_sum.cpp
blob: 9b82d3bba384a1f1122bb904f85de5fa42a7252b (plain)
1
2
3
4
5
6
7
8
9
10
int array_sum(int a[])
{
 int i=0, sum=0;
 for(i=0;i<5;i++)
 {
   sum = sum + a[i];
 }
 return sum;
}