Show that a group of order $n$ is isomorphic to $\mathbb{Z}/{n \mathbb{Z} }$ if and only if it contains an element of order $n.$
How should I define a function from $G$ to$\mathbb{Z}/{n \mathbb{Z} }$ to show that it's a bijective homomorphism. We know that elements of $\mathbb{Z}/{n \mathbb{Z} }$ are $[0]_n,[1]_n, \cdots , [n-1]_n$ and it's an (abelian) group with operation $+:~[a]_n + [b]_n=[a+b]_n.$ Any help is much appreciated.
Let $f$ send $x$, the element of order $n$ to $[1]$. Then $f(x^n) = [n] = [0] = f(0)$, so it's well-defined; $f(x^m)\neq [0]$ for all $m< n$, so it is injective; surjectivity is just as clear.