A two-digit number is such that the product of its digits is 8. When 18 is subtracted from the number, the digits interchange their places. Find number.

Let the ones digit be ‘a’ and tens digit be ‘b’.


Given, two-digit number is such that the product of its digits is 8.


ab = 8 --- (1)


Also, when 18 is subtracted from the number, the digits interchange their places


10b + a – 18 = 10a + b


9b – 9a = 18


b – a = 2


b = 2 + a


Substituting in 1


a × (2 + a) = 8


a2 + 2a – 8 = 0


a2 + 4a – 2a – 8 = 0


a(a + 4) – 2(a + 4) = 0


(a – 2)(a + 4) = 0


a = 2


Thus, b = 4


Number is 42


22