From yesterday I'm with the following exercise and I'd appreciate If someone could check what I have so far. Thanks:
Let $R$ be a commutative ring, not necessarily with identity, and whose only ideals are $R$ and $\{0\}$, and $R$ is not the trivial ring. Show that $R$ is either a field or $(R,+)$ is isomorphic to $\mathbb{Z}/p\mathbb{Z}$ (which I denote for simplicity $Z_p$) for $p$ a prime number and the product of any two elements is always zero.
The first part is completely trivial, because if it has a $1$, it follows immediately that is a field (as is commutative and doesn't have proper ideals). But if not have a $1$. We shall show that the product of any two elements is always $0$. If not, let $rs\not=0$ then $(r)$ (the ideal generated by $r$) it has to be entire Ring, i.e., $Rr=R$ and so there must be some $a\in R$, s.t., $ar=r$ and is easy to see that this $a$ must be the $1$, contradiction.
Since the product of all the elements is zero and the Ring is not the zero ring, for a non zero $r$, $Rr=\{0\}$. Let $\langle r \rangle$ the subgroup of $(R, +)$ generated by $r$. It's clearly an ideal an so there must be the entire ring $R$. So there is a $n$, s.t., $nr=0$.
We claim that $n\not=0$. Suppose not, we have that $2r\not= 0$, in fact $2rn\not=0$ for all $n$. Thus, by the same argument as above we have that $\langle 2r \rangle$ is an ideal and also is not the zero ideal, but it cannot be $R$, since $r\notin \langle 2r \rangle$, therefore it has to be proper, contradiction. For instances, either $n$ or $-n$ is positive and we can pick the least such value, say $n$.
Now we have to show that $n$ is prime. If $n$ were composite, so $n=ab$, and also the subgroup generated by $ar$ is an ideal and has to be the entire ring. But this is a contradiction, since the order of $ar$ is $b<n$ where $n$ is the order of $\langle r \rangle=R$. Then $n$ has to be a prime number. Thus, defining the surjective homomorphism $\mathbb{Z}\to (R,+);\,\langle r \rangle$, $n\mapsto nr$ is clear that $n\mathbb{Z}$ is the kernel and by the isomorphism thm, it follows that $Z_n$ and $(R,+)$ are isomorphic,
as was to be shown.