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

Method Sum

Arrays/18_Menu_Based_problem.cpp:164–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162 return min;
163}
164int Array::Sum()
165{
166 int s=0;
167 int i;
168 for(i=0;i<length;i++)
169 s+=A[i];
170
171 return s;
172}
173float Array::Avg()
174{
175 return (float)Sum()/length;

Callers 1

mainFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected