Find $4^{-1} \pmod{35}$, as a residue modulo 35.  (Give an answer between 0 and 34, inclusive.)
I know that $4^{-1} \pmod{35}$ means the inverse of 4 modulo 35, which is the number x such that $4x \equiv 1 \pmod{35}$. I start by dividing 35 by 4 and get a quotient of 8 and a remainder of 3: $35 = 4 \cdot 8 + 3$. Then I divide 4 by 3 and get a quotient of 1 and a remainder of 1: $4 = 3 \cdot 1 + 1$. I start with $1 = 4 - 3$, and then substitute 3 with $35 - 4 \cdot 8$: $1 = 4 - (35 - 4 \cdot 8)$. I simplify this and get $1 = 4 \cdot 9 - 35$. This means that $4 \cdot 9 \equiv 1 \pmod{35}$, so 9 is the inverse of 4 modulo 35. The answer is 9, which is a residue between 0 and 34. 