Question 621514: Got stumped on this.
A farmer bought 100 animals for $100.00. Pigs are $10, goats are $3, and chickens are $.50. How many of each animal did he purchase.
What would the formula be? The third variable has me stpooee
Thanks
Answer by Alan3354(69443) (Show Source):
You can put this solution on YOUR website! A farmer bought 100 animals for $100.00. Pigs are $10, goats are $3, and chickens are $.50. How many of each animal did he purchase.
-----------------
10p + 3g + c/2 = 100 (total cost)
p + g + c = 100 (total animals)
----------
There are 3 variables but only 2 equations.
The "trick" is, the variables have to be integers.
----------
c has to be an even number.
p has to be less than 10
From there, it's trial and error.
I've seen references to Diophantine Equations that might apply here, but I don't know about them.
=========================
I'll work on this later.
|
|
|