Given rational number is 27/8
p/q is terminating if
a) p and q are co-prime &
b) q is of the form of 2n 5m where n and m are non-negative integers.
Firstly, we check co-prime
27 = 3 × 3 × 3
8 = 2 × 2 × 2
27 and 8 have no common factors
Therefore, 27 and 8 are co-prime.
Now, we have to check that q is in the form of 2n5m
8 = 23
= 1 × 23
= 50 × 23
So, denominator is of the form 2n5m where n = 3 and m = 0
Thus, 27/8 is a terminating decimal.