The problem is to find the maximal subgroups of $Z$ and $Z/nZ$.
I did the first part and I found the maximal subgroups of $Z$ are:
$nZ$ with n as a prime integer.
I'm a little bit confused with second part.
I know the structure of a subgroup of $Z/nZ$ is : $mZ/nZ$ with $nZ⊆mZ$ which means $m|n$
Here is my answer but I'm not sure if this is correct or not?
Let $H$ a maximal subgroup of $Z/nZ$: $∃m$ integer :$H$=$mZ/nZ$.
Let $K$ a subgroup of $Z/nZ$: $∃m'$ integer : $K$=$m'Z/nZ$
$H$$\subset$$K$ => $mZ/nZ$ $\subset$ $m'Z/nZ$ => $mZ$ $\subset$ $m'Z$ <=> $m'|m$.
H maximal and $H$$\subset$$K$ => $K$=$Z/nZ$ => $m'=1$ =>
the divisors of m are only m and 1 => m is prime. so Are the maximal subgroups of $Z/nZ$ : $mZ/nZ$ with $m$ a prime integer?!
Your solution is essentially right but can be better rendered as follows:
The maximal subgroups of $\mathbb Z$ are exactly $p\mathbb Z$ where $p$ is prime.
By the canonical correspondence $\mathbb Z \to \mathbb Z/n\mathbb Z$, the maximal subgroups of $\mathbb Z/n\mathbb Z$ correspond exactly to the maximal subgroups of $\mathbb Z$ that contain $n\mathbb Z$.
The subgroups of $\mathbb Z$ that contain $n\mathbb Z$ are exactly $m\mathbb Z$ where $m$ is a divisor of $n$.
The maximal subgroups of $\mathbb Z/n\mathbb Z$ are exactly $p\mathbb Z/n\mathbb Z$ where $p$ is prime divisor of $n$.