To find the median value in an array, you must first sort it so that its values are in increasing or decreasing order. Once that is done, you select the middle element. If the array has 7 items, its middle element is the 4th element. In a C array, the 4th element has subscript 3. How do you get this subscript - try dividing the number of elements (7) by 2. If the array has an even number of elements, you need to average the two elements in the middle. If the array has 6 elmements, you need to average the elements with subscripts 2 and 3. How do you get these two subscripts? One you get by dividing the number of elements by 2. You should be able to figure out how to get the other one - the difference between the two subscripts is 1. Now how do you now whether the array has an odd number or an even number of elements? You can test the remainder of the number of elements divided by 2 (num % 2). If the remainder is 0, num is even.