24. One day, a beverage warehouse sold 252 cans of soda to 100 customers, and each customer bought at least one can of soda. On this day, the maximum possible median of the number of cans of soda each customer bought is ( ).
(A) 2.5
(B) 3.0
(C) 3.5
(D) 4.0
(E) 4.5
24. C.

Let the number of cans of soda each customer buys be $a_{i}(i \in$ $\mathbf{Z}, 1 \leqslant i \leqslant 100$ ). Then $1 \leqslant a_{1} \leqslant a_{2} \leqslant \cdots \leqslant a_{100}$.

To maximize the median of $a_{1}, a_{2}, \cdots, a_{100}$, i.e., to make $a_{50}$ and $a_{51}$ as large as possible, the first 49 customers each buy one can, i.e.,
$$
a_{1}=\dot{a}_{2}=\cdots=a_{49}=1,
$$

leaving $252-49=203$ cans, and $203=51 \times 3+50$. Thus, $a_{50}=3, a_{51}=a_{52}=\cdots=a_{100}=4$.
Therefore, the maximum value of the median is $\frac{3+4}{2}=3.5$.