Step 1: Apply the law of large numbers.
Since \(X_1,X_2,\ldots\) are independent and identically distributed, \(X_1^2,X_2^2,\ldots\) are also independent and identically distributed.
Thus, by the law of large numbers,
\[
Y_n=\frac{1}{n}\sum_{i=1}^{n}X_i^2
\]
converges in probability to
\[
E(X_1^2)
\]
Step 2: Compute \(E(X^2)\).
Since
\[
X\sim U(0,3),
\]
we have
\[
f(x)=\frac13,\qquad 0<x<3
\]
Therefore,
\[
E(X^2)=\int_0^3 x^2\cdot \frac13\,dx
\]
\[
=\frac13\left[\frac{x^3}{3}\right]_0^3
\]
\[
=\frac13\cdot 9
\]
\[
=3
\]
Step 3: Final conclusion.
Hence,
\[
Y_n \xrightarrow{P} 3
\]
Therefore, the required integer is
\[
\boxed{3}
\]