My book says that each subgroup of $\mathbb Z/n\mathbb Z$ is of the form $$ H=\{\overline d,\overline{2d},\dots,\overline{n-d},\overline n\}, $$ where $d$ is a divisor of $n$. However, I don’t see what goes wrong if $p\nmid n$, and if we take $$ H'=\{\overline p,\overline{2p},\dots,\overline{np}\}. $$ It seems to me we still have a subgroup, because $\overline 0$ is an element, for $\overline{pn}=\overline 0$. Also, if $\overline a, \overline b\in H'$, we can write $a=kp$ and $b=lp$, and then $\overline a +\overline b=\overline{(k+l)p}\in H'$. Same for the inverse. So what am I missing here? Maybe it isn't guaranteed that $\overline{(k+l)p}\in H'$?
EDIT
By the help of the chat, I realised that obviously $H'$ has $n$ elements, and therefore it must equal $\mathbb Z/n\mathbb Z$.