Solution
= Solution
Let $e^2=e$ with $e\ne0,1$. Then $e(1-e)=0$, and the <ideals> $eR$ and $(1-e)R$ are nonzero <rings> with identities $e$ and $1-e$. Define
$$
\Phi:R\longrightarrow eR\times(1-e)R,
\qquad
\Phi(r)=(er,(1-e)r).
$$
This is a <ring homomorphism>. Its inverse is $(x,y)\mapsto x+y$, because $ex=x$, $(1-e)y=y$, and the cross terms vanish. Hence $R\cong eR\times(1-e)R$, proving (ii).