Let $A,B,C$ be finitely generated $\mathbf{Z}/p^n\mathbf{Z}$-modules, where $p$ is prime and $n\geq 1$, and suppose $A\oplus C\cong B\oplus C$. Prove that $A\cong B$.
This problem has frustrated me since I can't seem to figure out how $\mathbf{Z}/p^n\mathbf{Z}$ and the finitely generated hypothesis play a role. I would like to do something like the following, but I am skeptical of the middle isomorphism (hence the question mark), though I'm fairly certain the others are okay: $$ A\cong \frac{A\oplus C}{0\oplus C}\overset{\text{?}}{\cong}\frac{B\oplus C}{0\oplus C}\cong B $$ Can anyone give me some hints? I was trying to construct the middle isomorphism explicitly by looking at the homomorphism $A\oplus C\rightarrow \frac{B\oplus C}{0\oplus C}$ induced by the isomorphism $A\oplus C\rightarrow B\oplus C$, but I couldn't seem to figure out how to use the hypotheses, or why things might fail without them...