MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / Sum

Function Sum

Arrays/31_Menu_for_Array.c:297–305  ·  view source on GitHub ↗

Sum Function

Source from the content-addressed store, hash-verified

295
296//Sum Function
297int Sum(struct array arr)
298{
299 int sum=0,i;
300 for(i=0;i<arr.length;i++)
301 {
302 sum+=arr.A[i];
303 }
304 return sum;
305}
306
307//Average Function
308float Avg(struct array arr)

Callers 3

AvgMethod · 0.70
AvgFunction · 0.70
mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected