### Theory:

Theorem I: Let $$x$$ be a rational number whose decimal expansion terminates. Then $$x$$ can be expressed in the form $$\frac{p}{q}$$, where $$p$$ and $$q$$ are coprime, and the prime factorization of $$q$$ is of the form $$2^n 5^m$$ where $$n$$, $$m$$ are non-negative integers.
Proof: Let $$x$$ be a rational number.

We know that any rational number can be written in the form of $$\frac{p}{q}$$ where $$p$$ and $$q$$ are coprime.

Consider the following examples.

1. $$0.125$$

$$0.125 = \frac{125}{10^3} = \frac{5^3 \times 2}{2^3 \times 5^3}$$

2. $$0.0002275$$

$$0.0002275 = \frac{2275}{10^7} = \frac{7 \times 13 \times 5^2}{2^7 \times 5^7}$$

3. $$56.25$$

$$56.25 = \frac{5625}{10^2} = \frac{3^2 \times 5^4}{2^2 \times 5^2}$$

From the above results, observe that the given number is converted into a rational number in the form of $$\frac{p}{q}$$, where $$p$$ and $$q$$ are coprime. Since the denominators are in the powers of $$10$$ which have $$2$$ and $$5$$ as factors and the prime factorisation of $$q$$ is in the form of $$2^m 5^n$$ where $$m$$ and $$n$$ are non-negative integers.

Hence proved.
Theorem II: Let $$x = \frac{p}{q}$$ be a rational number, such that the prime factorization of $$q$$ is of the form $$2^n 5^m$$, where $$n$$, $$m$$ are non-negative integers. Then $$x$$ has a decimal expansion which terminates.
Proof: Let us prove the theorem using an example.

Consider a rational number in the form of $$\frac{p}{q}$$, where $$p$$ and $$q$$ are coprime and $$q$$ is in the power of $$10$$.

1. $$\frac{17}{25}$$

$$\frac{17}{25} = \frac{17}{5^2} = \frac{17 \times 2^2}{5^2 \times 2^2} = \frac{68}{100} = 0.68$$

2. $$\frac{81}{16}$$

$$\frac{81}{16} = \frac{9^2}{2^4} = \frac{9^2 \times 5^4}{2^4 \times 5^4} = \frac{50625}{10000} = 5.0625$$

From the above results, we can see that a rational number of the form $$\frac{p}{q}$$, where $$q$$ is of the form $$2^n 5^m$$ to an equivalent rational number $$\frac{a}{b}$$ where $$b$$ is in the power of $$10$$. Thus, the decimal expansion terminates.

Hence proved.
Theorem III: Let $$x = \frac{p}{q}$$, where $$p$$ and $$q$$ are coprimes, be a rational number, such that the prime factorization of $$q$$ is not of the form $$2^n 5^m$$, where $$n$$, $$m$$ are non-negative integers. Then, $$x$$ has a decimal expansion which is non-terminating repeating (recurring).
Proof: Let us prove this theorem using an example.

Consider the rational number $$\frac{4}{3}$$. This rational number is of the form $$\frac{p}{q}$$. In this, the denominator cannot be expressed in the form of $$2^n 5^m$$, and it has a non-terminating decimal expansion.

Hence proved.
Important!
From the above theorems, we can conclude that the decimal expansion of every rational number is either terminating or non-terminating repeating.