In order for the range to be 22, there must be a number that is 22 more than 4 (the minimum in the set). Thus n must be 26. Putting the set in order, we get
4, 8, 9, 23, 24, 25, 26.
23 is the middle number of these, the median.
4, 8, 9, 23, 24, 25, 26.
23 is the middle number of these, the median.