So just sort the list and then determine which answer to give using the modulo operator %.
Note that some authors consider the median of a list with an even number of elements to be the arithmetic mean of locations n/2-1 and n/2.
In reply to Re: how to find median value
by mpolo
in thread how to find median value
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |