Find closest multiple of $239$ to $1171$. We see that $4 \times 239 = 956$ is the nearest. Now subtract $956$ from $1171$ to get reminder $215$. Add $4$ to quotient.
Find closest multiple of $239$ to $2151$. We see that $9 \times 239 = 2151$ is the nearest. Now subtract $2151$ from $2151$ to get reminder $0$. Add $9$ to quotient.
Since $0$ is less than $239$, stop the division. The reminder is $0$. The topmost line $00049$ is the quotient. Remove all zeros at the start of the quotient to get the actual quotient $49$.