Array(median)

The median of an array of numbers is the element m of the array such that half the remaining numbers in the array are greater than or equal to m and half are less than or equal to m, if the number of elements in the array is odd. If the number of elements is even, the median is the average of the two elements m1 and m2 such that half the remaining elements are greater than or equal to m1 and m2, and half the elements are less than or equal to m1 and m2. Write a C++ function that accepts an array of numbers and returns the median of the numbers in the array, and the corresponding program to test the function.
Dont expect anyone to help you. You just copied your assignment line for line and you didnt even have the courtesy to say please anywhere. Write what you can and if you get stuck then post back.
Topic archived. No new replies allowed.