Question: C++ Median Function: In statistics, when a set of values is sorted in ascending or descending order, its medianis the middle value. If the set
C++
Median Function:
In statistics, when a set of values is sorted in ascending or descending order, its medianis the middle value. If the set contains an even number of values, the median is themean, or average, of the two middle values. Write a function that accepts as arguments the following: A) An array of integers. B) An integer that indicates the number of elements in the array. The function should determine the median of the array. This value should be returned as a double . (Assume the values in the array are already sorted.) Demonstrate your pointer prowess by using pointer notation instead of array notation in this function.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
