點解要做到咁複雜, 用quadratic equation咪得囉..
let x be one no. , 27-x be the other no.
x(27-x) = 180
27x-x^2 -180 = 0
x^2 - 27x +180+0
x=15 or 12
sub x= 15 into 27-x ,, = 12
sub x= 12 into 27x,, = 15
so the two numbers are 12 and 15
Let the two number be A and B
A+B=27 AB=180--------(2)
A=27-B-----------(1)
Sub(1)into(2), it gives
(27-B)B=180
27B-B^2-180=0
B^2-27B+180=0
(B-15)(B-12)=0
B=12 OR B=15
if B=12, A=27-12=15
if B=15, A=27-15=12