Any number which can be represented in the form of p/q where q is greater than 0 is called a rational number. The real numbers which cannot be expressed in the form of p/q, where p and q are integers and q ≠ 0 are known as irrational numbers.
q must satisfy the condition that if prime factors of q are 2,5 or their product then the rational numbers always have a terminating decimal expansion.