The volume of a cylinder is given by the formula:
\[
V_{\text{cylinder}} = \pi r^2 h
\]
The volume of a cone is given by the formula:
\[
V_{\text{cone}} = \frac{1}{3} \pi r^2 h
\]
Since both the cylinder and cone have the same radius \( r \) and height \( h \), the ratio of their volumes is:
\[
\frac{V_{\text{cylinder}}}{V_{\text{cone}}} = \frac{\pi r^2 h}{\frac{1}{3} \pi r^2 h} = 3:1
\]
Thus, the ratio of the volumes of the cylinder and cone is \( 3:1 \).