Look at several examples of rational numbers in the form p/q (q ≠ 0) where p and q are integers with no common factors other than 1 and having terminating decimal representations (expansions). Can you guess what property q must satisfy?
We observe that when q is 2, 4, 5, 8, 10... then the decimal expansion is terminating. For example:
1/2 = 0.5, denominator q = 21
7/8 = 0.875, denominator q = 23
4/5 = 0.8, denominator q = 51
We can observed that terminating decimal may be obtained in the situation where prime factorisation of the denominator of the given fractions has the power of 2 only or 5 only or both.