Answer:
The number of pigs the farmer has is 47
Step-by-step explanation:
Assume that the number of pigs is x and the number of chickens is y
β΅ The farmer has 102 animals
β΅ The number of pigs is x
β΅ The number of chickens is y
β Add them and equate the sum by 102
β΄ x + y = 102 β (1)
β΅ Each pig has 4 legs
β΄ The number of legs of all pigs is 4x
β΅ Each chicken has 2 legs
β΄ The number of legs of all chickens is 2y
β΅ He has a total of 298 legs
β Add 4x and 2y, then equate the sum by 298
β΄ 4x + 2y = 298 β (2)
Now we have a system of equations to solve it
β Multiply equation (1) by -2 to make the coefficients of y equal in values
Β Β and opposite in signs
β΅ -2(x) + -2(y) = -2(102)
β΄ -2x - 2y = -204 β (3)
β Add equations (2) and (3)
β΅ (4x + -2x) + (2y + -2y) = (298 + -204)
β΄ 2x + 0 = 94
β΄ 2x = 94
β Divide both sides by 2 to find x
β΄ x = 47
β΄ The number of pigs the farmer has is 47