In class we learn that every ideal of $\mathbb Z$ is of the form $n \mathbb Z$ where $n \in \mathbb Z$ so every subring is an ideal . So I wonder "what conditions does an arbitrary ring $R$ need to satisfy so that every subring is an ideal?"
My teacher suggest that I need to start with a commutative ring with identity. Then I found that the only ring with that property has to be isomorphic to $\mathbb Z$ or $\mathbb Z / n \mathbb Z$.
So what about a commutative ring without identity? or a non-commutative ring?