Let $G$ be a group. If $G/Z(G)$ is cyclic, then $G$ is Abelian.
I tried to prove it like this: I'll make use of the theorem that $G$ is Abelian $\iff Z(G)=G$.
Hence, it must be shown that $G=Z(G)$
Let $G/Z(G)=\langle gZ(G) \rangle$ for some $g\in G$.
On the contrary, assume that $Z(G)\ne G$
Case 1: If $g\in Z(G)$, then $Z(G)=gZ(G)$. Let $x\in G-G(Z)$ and hence $\exists m$ such that
$xZ(G)=(gZ(G))^m= (Z(G)^m=Z(G) \implies xZ(G)=Z(G)\iff x\in Z(G)$, which is a contradiction.
Case 2: Now assume that $g\in G-Z(G)$ and $x\in G-Z(G)$. There exists $r$ such that $xZ(G)=(gZ(G))^r=g^r Z(G)\implies (g^r)^{-1}x\in Z(G) \implies \exists z\in Z(G)$ such that $x=g^rz$. Since $z\in Z(G)$, we have $z\in C(g)$, where $C(g)$ is centralizer of $g$ and clearly $g^r\in C(g)$ and hence $x\in C(g)$. Since $x$ is an arbitrary element of $G-Z(G)$, we have shown that $g$ commutes with every element in $G-Z(G)$ and this implies that $g$ commutes with every element of $G$ and hence $g\in Z(G)$, which is a contradiction.
In both the cases above, we have a contradiction and hence $Z(G)=G$, whence it follows that $G$ is Abelian.
Is my proof correct? Please let me know. Thanks a lot for your time.