Given a regular $n$-sided prism where the side edge length is equal to the base edge length, then the maximum value of $n$ is
(A) 4
(B) 5
(C) 6
(D) no maximum value
3. (B).

Let the projection of the vertex $S$ of a regular $n$-pyramid onto the base $A_{1} A_{2} \cdots A_{n}$ be $O$. Then for $n \geqslant 6$, we have $S A_{1}>O A_{2} \geqslant A_{1} A_{2}$, so the $n$ that satisfies the condition is $n \leqslant 5$. When $n=5$, if the angle between the lateral edge and the base is $\arccos \frac{1}{2 \sin \frac{\pi}{5}}$, the length of the lateral edge is equal to the length of the base edge.