Limit of a periodic function existing [duplicate]

If

$\lim_{n \rightarrow \infty}f{\left(n\right)}=k$

and $f{\left(x\right)}$ is periodic and continuous, is that enough to imply that $f{\left(x\right)}$ is a constant function?

marked as duplicate by Trevor Gunn, Did, Shailesh, Yujie Zha, TomGrubbJul 26 '17 at 0:58

No, it is not: Consider $f(x) = \sin(\pi x)$. Then $f$ is continuous, periodic and we have $f(n) = \sin(n\pi) = 0$ for all $n \to \infty$ and thus $\lim_{n \to \infty} f(n) = 0$. But $f$ is not constant.