b)prin metoda ecuatiei
x= ap cu 2 camere y = ap cu 3camere
x+y = 45 apartamente ;
x = 45 - y
2x + 4y = 140 camere
2×(45-y )+ 4y = 140
90-2y + 4y = 140
2y = 140 - 90
y = 25
x = 45 - y
x = 45-25 = 20
x = 20 si y = 25
a) metoda aritmetica- metoda falsei ipoteze
ap cu 2 camere
ap cu 4 camere
in total 45 apartamente
2×nr de ap cu 2 camere
4×nr de ap cu 4 camere
in total 140 camere
Falsa ipoteza
presupunem ca sunt doar ap cu 4 camere
45×4=180 camere
dar stim ca sunt 180
180-140= 40 camere
40:2= 20 ap cu 2 camere
45-20=25 ap cu 4 camere
Verificare
20+25=40, 40=40
2×20+4×25=40+100=140 camere