Show that a subgroup of order $N \in \mathbb{N}$ is isomorphic to $\mathbb{Z}/n\mathbb{Z} × \mathbb{Z}/nn'\mathbb{Z}$. The following (from Modular Forms by Diamond Ch.$1$) is mentioned without a proof: 

If $N$ is the order of $K$ as a subgroup of $\mathbb{Z}/N\mathbb{Z}×\mathbb{Z}/N\mathbb{Z}$ then by the theory of ﬁnite Abelian groups $K \simeq \mathbb{Z}/n\mathbb{Z} × \mathbb{Z}/nn'\mathbb{Z}$  for some positive integers $n$ and $n'$.

I have no idea how to prove it. Please help!  

If $K$ is cyclic then $K\cong\mathbb Z/N\mathbb Z$ which you can write as $\mathbb Z/1\mathbb Z\times\mathbb Z/N\mathbb Z$. Assume that $K$ is not cyclic. By the fundamental theorem of finite abelian groups, you can write $K$ in the normal form: $$K\cong\mathbb Z/n_1\mathbb Z\times\mathbb Z/n_2\mathbb Z\times\ldots\times \mathbb Z/n_k\mathbb Z,$$ where $1<n_1\mid n_2\mid\ldots\mid n_k$ and $k\geqslant 2$. Clearly $n_1\mid N$. The set: $$S= \{x\in K\mid\mbox{order of x divides }n_1\}$$ is a subgroup isomorphic to $\mathbb Z/n_1\mathbb Z\times \mathbb Z/n_1\mathbb Z\times\ldots\times \mathbb Z/n_1\mathbb Z$  ($k$-times), so $|S|=n_1^k$. On the other hand: $$T=\{x\in\mathbb Z/N\mathbb Z\times \mathbb Z/N\mathbb Z\mid \mbox{order of x divides }n_1\}$$ is a subgroup isomorphic to $\mathbb Z/n_1\mathbb Z\times \mathbb Z/n_1\mathbb Z$, so $|T|=n_1^2$. Since $S\subseteq T$ we conclude $k\leqslant 2$, and thus $k=2$.
