A group $G$ of order $n$ is cyclic iff $G$ contains an element of order $n$ [closed]

Let $G$ be a finite group of order $n$. Prove that $G$ is cyclic if and only if $G$ contains an element of order $n$.

-

closed as off-topic by Jonas Meyer, Krish, අරුණ, John, Najib IdrissiMar 26 at 8:01

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – Jonas Meyer, Krish, අරුණ, John, Najib Idrissi
If this question can be reworded to fit the rules in the help center, please edit the question.

Which part is giving you trouble, "if" or "only if"? –  Robert Israel Sep 13 '11 at 18:47
This question does not show any research effort –  The Chaz 2.0 Sep 13 '11 at 19:09
if and only if is obviously wrong. –  Dinesh Sep 13 '11 at 19:57
@Dinesh: Which part do you think is wrong? –  Robert Israel Sep 13 '11 at 20:11
@Dinesh, did you overlook $G$ is of order $n$? –  Soarer Sep 13 '11 at 20:29

The key component in the proof is that if $a^i=a^j$ for some element $a$ then $a^{i-j}=e$ and hence the order of $a$ divides $i-j$. To say more will be simply to write a complete solution of the question for you.