There are 13 animals in the barn. some are chickens and some are pigs. there are 40 legs in all. How | MathCelebrity Forum

There are 13 animals in the barn. some are chickens and some are pigs. there are 40 legs in all. How

math_celebrity

Administrator
Staff member
There are 13 animals in the barn. some are chickens and some are pigs. there are 40 legs in all. How many of each animal are there?

Chickens have 2 legs, pigs have 4 legs. Let c be the number of chickens and p be the number of pigs. Set up our givens:
(1) c + p = 13
(2) 2c + 4p = 40

Rearrange (1) to solve for c by subtracting p from both sides:
(3) c = 13 - p

Substitute (3) into (2)
2(13 - p) + 4p = 40
26 - 2p + 4p = 40

Combine p terms
2p + 26 = 40

Subtract 26 from each side:
2p = 14

Divide each side by 2
p = 7

Substitute p = 7 into (3)
c = 13 - 7
c = 6

For a shortcut, you could use our simultaneous equations calculator
 
Back
Top