In $\triangle A B C$, let
$$
\begin{array}{l}
x=\cos A+\cos B+\cos C, \\
y=\sin \frac{A}{2}+\sin \frac{B}{2}+\sin \frac{C}{2} .
\end{array}
$$

Then the relationship between $x$ and $y$ is ( ).
(A) $x=y$
(B) $x \geqslant y$
(C) $x \leqslant y$
(D) cannot be determined
5.C.

From the conditions, we have
$$
\begin{array}{l}
\cos A+\cos B=2 \cos \frac{\pi-C}{2} \cdot \cos \frac{A-B}{2} \\
=2 \sin \frac{C}{2} \cdot \cos \frac{A-B}{2} \leqslant 2 \sin \frac{C}{2} .
\end{array}
$$

Similarly, $\cos B+\cos C \leqslant 2 \sin \frac{A}{2}$,
$$
\cos C+\cos A \leqslant 2 \sin \frac{B}{2} \text {. }
$$

Therefore, $x \leqslant y$.