Let $A$ be an infinite cyclic group and $B$ be a cyclic group of order $n$. Suppose $0 \to A \to G \to B \to 0$ is a short exact sequence of abelian groups. What could $G$ be?
It is clear enough that $G = \mathbb{Z} \oplus C_m$ works, for all $m$ such that $m$ divides $n$ and $\textrm{gcd}(m, n/m) = 1$, by the Chinese remainder theorem. $A$ and $B$ are finitely generated, so $G$ is as well; thus the structure theorem for finitely-generated abelian groups tells us that this is exhaustive. However, is there a more direct approach (in the sense of not using a sledgehammer) to this easy-looking exercise? (It is exercise 6.2 in Massey's A basic course in algebraic topology.)
For example, by tensoring with $\mathbb{Q}$, we obtain a right-exact sequence $\mathbb{Q} \to G \otimes \mathbb{Q} \to 0 \to 0$ which tells us that the free part of $G$ has rank at most $1$, and considering $\textrm{Hom}(-, \mathbb{Z})$, we get a right-exact sequence $0 \to \textrm{Hom}(G, \mathbb{Z}) \to \mathbb{Z} \to 0$ which indicates the free part of $G$ has rank exactly $1$. What can we say about the torsion part?