If there is an even number of of observations, then any number between the two middle values qualifies as a median. Standard practice is to report the mean of the two middle values. Second, if there is an odd number of observations or if the two middle values are tied, no value has half of the data greater than it and half less. A rigorous definition of the median is that it is a value such that at least half of the data are less than or equal to it and half of the data are greater than or equal to it. Consider the data set 0,0,0,0,1,7.
Similar remarks apply to all other percentiles.