Let $I\subset\mathbb{Z}$ be an ideal such that $I\neq \mathbb{Z}$ and if $I\subset J\subset\mathbb{Z}$ then $I=J$ or $J=\mathbb{Z}$. Show that $I=p\mathbb{Z}$ for some prime $p$.
Attempt: We know that $\mathbb{Z}/I$ is a field $\Rightarrow$ $\mathbb{Z}/I$ is an integral domain. So, $\forall x,y\in \mathbb{Z}/I$ such that $xy=0$, $x=0$ or $y=0$. I am confused where to go next.
There's a nice theorem for this.
Theorem: $\mathbb{Z}/n\mathbb{Z}$ is a field iff $n$ is prime.
Proof: Let $n$ be prime. Let $a \in \mathbb{Z}/n\mathbb{Z}$. We have the formula $$ab + kn = 1$$ and so $a^{-1} = b$ must exist by the extended euclidean algorithm.
Now let $n$ be composite. In this case $\mathbb{Z}/n\mathbb{Z}$ is not a field because it isn't even an integral domain. $\square$
I'm sure you can fill in the rest.