The following problem astounded me, because I really thought it shouldn't be that hard, but somehow I can't wrap my head around it.
Let $A=\mathbb{Z}\oplus\mathbb{Z}/d\mathbb{Z}$ for some $d\in\mathbb{N}$, as well as $(a,b+d\mathbb{Z})\in A$. Then what is $A/\langle(a,b+d\mathbb{Z})\rangle$?
I tried to find necessary and sufficient conditions in terms of some modular equations for $(x,y+d\mathbb{Z})$ to be in $\langle(a,b+d\mathbb{Z})\rangle$, which of course would give the result by the first isomorphism theorem. One way of doing this would be to use the observation that $(x,y+d\mathbb{Z})\in\langle(a,b+d\mathbb{Z})\rangle$ if and only if $a|x$ and $ad|bx-ay$, which gives that $A/\langle(a,b+d\mathbb{Z})\rangle$ is isomorphic to the image of $A$ under $(x,y+d\mathbb{Z})\mapsto(x+a\mathbb{Z},bx-ay+ad\mathbb{Z})$, but then I'm stuck at calculating this image.
The following method applies to any quotient of a finitely generated abelian group.
Call $I=\langle(a,b+d\mathbb{Z})\rangle.$ The quotient $A/I$ can be represented in matrix form as $\left(\matrix{a&b\\0&d}\right)$, which is to be read as "$A/I$ is the abelian group generated by $x$ and $y$ subject to the two relations $ax+by=0$ and $dy=0$.
With this point of view, realize that
Now, follow the recipe:
However, to identify the generators of these factors in the end (in terms of the generators of the initial factors), you need to keep track of the changes of variables performed during column operations.
Note: in the general case, at step 4. you end up with $\left(\matrix{c&0\\0&M}\right)$ with some submatrix $M$. At this point a factor $\Bbb Z/c\Bbb Z$ splits out and you can start over with $M$.