How to find rational numbers with terminating or non terminating repeating decimal expansion