i am a farmer he has $100 and he has to buy one hundred animals there is a chicken for $0.50 a goat for 3.50 and a sheep for $5 how many of each animal does he have to buy?

let x = number of chicken

let y = number of goat
let 100 - (x+y) = number of sheep
0.5x + 3.5y + 5[100-(x+y)] = 100
0.5x + 3.5y + 500 - 5x - 5y = 100
-4.5x - 1.5y = -400
9x + 3y = 800
there are actually many possible answers here since you got only 1 equation and 2 unknowns. Now you got to guess a value for x (must be a whole number and less than 100) and solve for y. Note that the value of y calculated must also be a whole number. If not, guess another x value and solve for y. If y calculated is also a whole number, you can now solve for 100 - (x+y), which is the number of sheep.

hope this helps~ :)