Let $A\xrightarrow{f} B\xrightarrow{g} C$ be an exact sequence of finitely generated abelian groups with $B\cong A\oplus C$.
Question: Is the sequence short exact?
If $B$ is finite, the answer is clear positive.
Is there a counterexample to show that the finiteness assumption on $B$ is vital? Thanks in advance!