Give an example of a UFD having a subring which is not a UFD.

Take any integral domain which is not a UFD and consider it as a subring of its field of fractions. (Fields are UFD for trivial reasons and if you don't accept this, take the polynomial ring over it)


Consider $\mathbb C$ , it is a field hence obviously $UFD $ but if you consider a subring $\mathbb Z[\sqrt {-5}]$, it is not a UFD . In fact, $9=3.3$ and also $9= (2+\sqrt{-5} ) . (2-\sqrt{-5})$ , Hence the factorization is not unique.