OOP WITH C++

Write two overloaded functions that return the average of an array with the following headers:
int average(const int array[],int size );
double average (const double array[],int size);

write a test program that prompt the user to enter 10 double values,invokes this functions and display average value



please help am a beginner to this course
NO REPLY
Please note that this is not a homework site. We won't do your homework for you. The purpose of homework is that you learn by doing. However we are always willing to help solve problems you encountered, correct mistakes you made in your code and answer your questions.

We didn't see your attempts to solve this problem yourself and so we cannot correct mistakes you didn't made and answer questions you didn't ask. To get help you should do something yourself and get real problems with something. If your problem is "I don't understand a thing", then you should go back to basics and study again.
roughly, for a vector average:
for (auto n : a)
avg+= n;
avg/=a.size();
Last edited on
Topic archived. No new replies allowed.