Find the $100^{th}$ decimal digit of $p/q$ Given two coprime nos $p,q$, how can I possibly find its  $100^{th}$ decimcal digit ?
Let's say $p=22, q=7$. Then how shall I proceed?
 A: Decimal expansions of rational numbers are periodic, so you can work out any digit by reducing modulo the period.
In the case you suggest, we can calculate $\frac{22}{7}=3.\overline{142857}$. Notice that the repeating string is six digits long. Since $100\equiv 4\pmod6$, the $100$th digit is the same as the $4$th digit, namely, $8$.
In general, the length of the repeating string will always divide $q-1$, so you can stop doing long division after that many steps.
A: Well, first you want to find its decimal expansion. In the case of $\frac{22}{7}$, you have
$$\frac{22}{7}=3.\overline{142857}$$
Then, since it repeats, you can find the $100$th digit using modular arithmetic. Since it repeats every $6$ digits, the $100$th digit is the same as the $(100 \bmod 6)$th digit, or the $4$th digit, which is $8$.
A: Notice that $22/7=3.142857...$ with the six decimal digits repeating. Thus the 100th digit is the same as the 4th digit which is 8.
A: For a given prime $q$,
the expansion of
$1/q$ repeats with a period
that divides $q-1$.
Do a division of
$p/q$ until it starts to repeat.
Then figure where the
100th digit based on the period.
