If the rational number

Question:

If the rational number $\frac{a}{b}$ has a terminating decimal expansion, what is the condition to be satisfied by $b$ ?

Solution:

Let x be a rational number whose decimal expansion terminates.

Then, we can express $x$ in the form $\frac{a}{b}$, where $a$ and $b$ are coprime, and prime factorization of $b$ is of the form $\left(2^{m} \times 5^{m}\right)$, where $m$ and $n$ are non negative integers.