Median Calculator

Guys I am passing the whole array to the function to calculate Median. How can I do it. I coded it but i dont think it works. PLease dont give me the code. Just idea.
You know what a median average is, right? If you have a list of sorted values, it's the value closest to the centermost index (that is, (size + 1) / 2 - 1). Basically, what you need to do is sort your array if it's not already sorted, then if there are an odd number of values, pick out the one given by that formula I gave you, otherwise... I'll leave the "otherwise" part up to you. :)

-Albatross
Thank you very much :) And I figure that out :)
Topic archived. No new replies allowed.