Rational number p/q, q ≠ 0 will be terminating decimal if the prime factorisation of q is of the form. (m and n are non negative integers):
2m x 5n
Rational number p/q, q ≠ 0 will be terminating decimal if the prime factorisation of q is of the form 2m x 5n.