Question: Skill Practice Assignment 2 - Median Function Median Function: In statistics, when a set of values is sorted in ascending or descending order, its median

Skill Practice Assignment 2 - Median Function Median Function: In statistics, when a set of values is sorted in ascending or descending order, its median is the middle value. If the set contains an even number of values, the median is the mean, 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 teh array are already sorted.) Please use pointer notation rather than array notation in solving this problem. In order to assure us of using the same even and odd arrays, please use the following in your assignment // An array with an odd number of elements int odd[] = { 1, 2, 3, 4, 5, 6, 7}; II An array with an even number of elements int even[] = { 1, 2, 3, 4, 5, 6, 7, 8 }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
