Theorem: Prove that if $G/Z(G)$ is cyclic then $G$ is abelian.
My confusion is that if theorem is true i.e. $G/Z(G)$ is cyclic then $G$ is abelian, then $Z(G)=G$ implies $|G/Z(G)|$ always equal to 1. Am I thinking correctly?
If I am then let $|G|=pq$ where $p,q$ are distinct primes. Then if $|Z(G)|=p$ then $|G/Z(G)|=q$ implies $|G/Z(G)|$ is cyclic. Hence $G$ is abelian. Is this true?
If this is true then $|Z(G)|=pq$. What is going on?