Calculate $\operatorname{Ext}(\mathbb{Z}/n,\mathbb{Z}/m)$ for $n,m \geq 2$. I can easily find that a free presentation of $\mathbb{Z}/n$ is $\mathbb{Z}$ with $p:\mathbb{Z}\rightarrow\mathbb{Z}/n$ given by the quotient map. And obviously the kernel of this is $\ker(p)=n\mathbb{Z}$. Therefore we have a short exact sequence,
$$0\rightarrow n\mathbb{Z}\xrightarrow{i}\mathbb{Z}\xrightarrow{p}\mathbb{Z}/n\rightarrow 0$$
where $i$ is the inclusion. This gives us the exact sequence,
$$0\rightarrow\operatorname{Hom}(\mathbb{Z}/n,\mathbb{Z}/m)\xrightarrow{p^*}\operatorname{Hom}(\mathbb{Z},\mathbb{Z}/m)\xrightarrow{i^*}\operatorname{Hom}(n\mathbb{Z},\mathbb{Z}/m)$$
And we can define $\operatorname{Ext}(\mathbb{Z}/n,\mathbb{Z}/m)=\operatorname{Hom}(n\mathbb{Z},\mathbb{Z}/m)/\text{im}(i^*)$.


*

*Does the above make sense, is this the right way to approach the problem?

*If so, what is $\operatorname{Hom}(n\mathbb{Z},\mathbb{Z}/m)$ and what is the image of $i^*$?

 A: It's better to consider $0\to\mathbb{Z}\xrightarrow{\mu_n}\mathbb{Z}\xrightarrow{p}\mathbb{Z}/n\mathbb{Z}\to 0$, where $\mu_n$ is the multiplication by $n$, because $\mu_n^*$ is again multiplication by $n$. Thus you get
$$
0\to
\operatorname{Hom}(\mathbb{Z}/n\mathbb{Z},\mathbb{Z}/m\mathbb{Z})
\xrightarrow{p^*}
\operatorname{Hom}(\mathbb{Z},\mathbb{Z}/m\mathbb{Z})
\xrightarrow{\mu_n}
\operatorname{Hom}(\mathbb{Z},\mathbb{Z}/m\mathbb{Z})
$$
Now you know that $\operatorname{Hom}(\mathbb{Z},\mathbb{Z}/m\mathbb{Z})\cong\mathbb{Z}/m\mathbb{Z}$ in a “canonical” way so what you need to compute the image of
$$
\mu_n\colon\mathbb{Z}/m\mathbb{Z}\to\mathbb{Z}/m\mathbb{Z}
$$
which is $(n\mathbb{Z}+m\mathbb{Z})/m\mathbb{Z}=d\mathbb{Z}/m\mathbb{Z}$, where $d=\gcd(m,n)$. Finally, $\operatorname{Ext}(\mathbb{Z}/n\mathbb{Z},\mathbb{Z}/m\mathbb{Z})\cong\mathbb{Z}/d\mathbb{Z}$.
A: Actually, its more generally true that 
$${\rm Ext}(\mathbb{Z}/n\mathbb{Z},A)\cong A/nA$$
for any abelian group $A$. Here is the proof (essentially the generalization of @egreg's argument)
Consider the resolution $\mathbb{Z}\overset{\times n}{\to}\mathbb{Z}\to \mathbb{Z}/n$. Apply $\hom(-,A)$ to get the sequence
$$0\to \hom(\mathbb{Z},A)\overset{(\times n)^*}{\to} \hom(\mathbb{Z},A)\to 0\to ...$$
But $\hom(\mathbb{Z},A)\cong A$, since a homomorphism $\varphi:\mathbb{Z}\to A$ is uniquely determined by where it sends $1\in \mathbb{Z}$. The induced map $(\times n)^*$ sends an element $a\in A$ to $na\in A$. Hence,
$${\rm Ext}(\mathbb{Z}/n\mathbb{Z},A)\cong A/nA\;.$$ 
Applying that to $A=\mathbb{Z}/m\mathbb{Z}$, we get $\mathbb{Z}/\gcd(n,m)\mathbb{Z}$.
