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

Publish date: 2024-04-27
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

ncG1vJloZrCvp2O6osDHnJylnZKntrXFjZympmeTpLquwc2iq7JnpJ2%2Fpq3DrGatoJWnsm6t0Z5kamtdlruqucClqmahnmLBqbGMm5irpl2ovK6xjJqpnmWTnbakt8SnqmaZnpl6tLvMnmSaqpVivaqz0maroZ2imnqivsRma2llnJq0tHnIp2SapJxitbDDjWxobWc%3D