Show that there is a nonabelian group of order $p^n$ with a cyclic subgroup of index $p$ Assume $p$ is a prime integer and let $n$ be an integer such that $n \geq 3$. 


  Show that there is a nonabelian group of order $p^n$ with a cyclic subgroup of index $p$.
The dihedral group $D_8$ is of order $8=2^3$ and it is non-abelian group. Also, any subgroup of $D_8$ with order $2$ is cyclic.
The dihedral group $D_8$ is of order $8=2^3$ and it is non-abelian group. Also, any subgroup of $D_8$ with order $2$ is cyclic.