real analysis – Prove that \$f_n(x) = cos^{n} x\$ is not uniformly convergent on \$[0, pi]\$

Prove that $$f_n(x) = cos^{n} x$$ is not uniformly convergent on $$(0, pi)$$

Intuitively I can see that if $$x=0$$ or $$x = pi$$ then $$lim_{nto infty} f_n (x) = 1$$ but if $$x in (0,pi)$$, then $$lim_{nto infty} f_n(x) = 0$$.

I tried to explain that $$lim_{xto 0^+}{ lim_{ntoinfty} f_n(x)} = 0$$ but $$f_n(0) = 1$$ so the limit does not exist which would imply that there is also no possible uniform convergence.

What is the right approach?