No. The symmetric groups $S_n$ for $n\geq 3$ have trivial centre, but the dihedral groups $D_{n!/2}$ all have a centre of order $2$, since $n!/2$ is even.
No. The symmetric groups $S_n$ for $n\geq 3$ have trivial centre, but the dihedral groups $D_{n!/2}$ all have a centre of order $2$, since $n!/2$ is even.