# a farmer bought chickens, goats and sheep. the cost of a chicken is .50

goat is \$3.50 and sheep is \$10
He bought 100 animals and spent \$100. how many of each animal did he buy

Since you have two equations and three unknowns, there are many combinations of c (the number of chickens), g (the number of goats) and s (the number of sheep) that meet the requirements
c + g + s = 100 (total number)
0.5 c + 3.5 g + 10 s = 100 (total cost)

However, the only acceptable solutions are the ones for which c, g and s are all integers. I had to resort to trial and error to make that happen. g = 0, 1 , and 3 did not work. However, if you choose g = 4, then
c + 4 + s = 100
0.5 g + 14 + 10 s = 100
10 c + 40 + 10 s = 1000
9.5 c + 26 = 900
9.5 c = 874
c = 92 ; s = 100 -4 -92 = 4 ; g = 4

There may be other solutions as well.

Let s, g and c be the respective numbers of each animal.
Then, s + g + c = 100.
Also, 10s + 3.5g + .5c = 100 or 20s + 7g + c = 200.
Subtracting the first expression from the second yields 19s + 6g = 100.
Dividing through by the lowest coefficient yields g + 3s + s/6 = 16 + 4/6.
(s - 4)/6 must be an integer k making s = 6k + 4.
Substituting back into 19s + 6g = 100 yields g = 4 - 19k.
Clearly, k can only be zero making s = 4, g = 4 and c = 92.
Checking: 10(4) + 3.5(4) + .5(92) = \$100.00.

## To solve this problem, you can set up a system of equations based on the given information. Let's use c to represent the number of chickens, g to represent the number of goats, and s to represent the number of sheep.

The first equation comes from the fact that the farmer bought 100 animals in total: c + g + s = 100.

The second equation comes from the cost of the animals. The cost of a chicken is \$0.50, the cost of a goat is \$3.50, and the cost of a sheep is \$10. So, the total cost can be expressed as: 0.5c + 3.5g + 10s = 100.

Now you have a system of equations:

c + g + s = 100
0.5c + 3.5g + 10s = 100

To solve this system, you can use substitution or elimination. Let's use substitution.

You can solve the first equation for c: c = 100 - g - s.

Then substitute this expression for c in the second equation: 0.5(100 - g - s) + 3.5g + 10s = 100.

Simplify and solve for g and s:

50 - 0.5g - 0.5s + 3.5g + 10s = 100
3g + 9.5s = 50

Next, solve the equation c + g + s = 100 for c: c = 100 - g - s.

Substitute this expression for c in the first equation: (100 - g - s) + g + s = 100.

Simplify and solve for g and s:

100 - g - s + g + s = 100
0 = 0

The equation 0 = 0 is always true, which means there are infinitely many solutions to this system of equations. This implies that there are multiple combinations of chickens, goats, and sheep that satisfy the given conditions.

One possible solution is:
c = 92 (chickens)
g = 4 (goats)
s = 4 (sheep)

In this solution, the farmer bought 92 chickens, 4 goats, and 4 sheep, which adds up to 100 animals. The total cost is \$100, as the cost of each animal matches the given prices.

However, note that there may be other valid combinations of chickens, goats, and sheep that satisfy the given conditions.