This is an exercise from a textbook "Algebra: Chapter 0" by Paolo Aluffi.
First, I state necessary facts from the book used in the exercise:
For every abelian group $G, End_{Ab}(G)$( the set of group homomorphisms from $G$ to $G$) is a ring with operations:
$+: (f+g)(a) = f(a) + g(a)$
$.: (fg)(a) = f(g(a))$
and zero $0_{End_{Ab}(G)} = $ trivial map $0: \ \ im0 = 0$, identity $1_{End_{Ab}(G)} = 1_G \in End_{Ab}(G)$
Proposition. $End_{Ab}(\mathbb{Z}) \cong \mathbb{Z}$ as rings.
Let $R$ be a ring. For $r \in R$, define left-multiplication by $r$ by $\lambda_r$. $\lambda_r$ is an endomorphism of the underlying abelian group $(R,+)$.
Proposition. Let $R$ be a ring. Then the function $\lambda: R \to End_{Ab}(R)$ defined by $\lambda(r) = \lambda_r$ is an injective ring homomorphism.
Now, here goes the exercise: it's on the page $138$ in book, numbered $2.16$.
Prove that there is (up to isomorphism) only one structure of ring(with identity) on the abelian group $(\mathbb{Z},+)$. Let $R$ be a ring whose underlying group is $\mathbb{Z}$. Then there is an injective ring homomorphism $\lambda: R \to End_{Ab}(R)$, and the latter is isomorphic to the ring $\mathbb{Z}$. Prove that $\lambda$ is surjective is this case.
So, assume $R$ is some ring, whose underlying abelian group is $(\mathbb{Z}, +)$. We may denote it as $(\mathbb{Z}, + , o , 1_R = k)$ where $o$ is multiplication in $R$, and $k$ is some integer serving and identity in this ring.
We need to prove that every group homomorphism $\phi:(\mathbb{Z},+) \to (\mathbb{Z},+)$ may be defined by formula $\phi(n) = d \ o \ n$ for some integer $d$.
But every group endomorphism $\phi$ of $(\mathbb{Z},+)$ is uniquely determined by the image of $1$. Since $\forall n \in \mathbb{Z} \ \ \phi(n) = \phi(n1) = n\phi(1)$.
And $1_{(\mathbb{Z},+)}$ is determined as $\forall z \in \mathbb{Z} \ \ 1_{(\mathbb{Z},+)}(z) = k(=1_{(\mathbb{Z},+,o)}) \ o \ z = z$.
What can be done next to show $\lambda: (\mathbb{Z}, +, o, k) \to End_{Ab}(\mathbb{Z})$ is surjective?