Reduce to the case $n$ is a prime power, then it's straightforward. –  Geoff Robinson Aug 5 '11 at 18:50
@Charles: Yes, by the CRT. Now add the fact that $\mathbb{Z}/n\mathbb{Z}$ has a simple structure when $n$ is a prime power (it is cyclic or the 2-element group times a cyclic group). –  GH from MO Aug 8 '11 at 10:07