document.write( "Question 160772: When young MacDonald was starting his farm a long time ago, cows cost $10 each, pigs cost $3 each, and chickens cost $0.50 each. He purchased at least one of each kind of animal. He paid axactly $100 for exactly 100 animals. How many chickens did he buy? \n" ); document.write( "
Algebra.Com's Answer #118560 by ptaylor(2198)\"\" \"About 
You can put this solution on YOUR website!
Let x=number of cows
\n" ); document.write( "y=number of pigs
\n" ); document.write( "z=number of chicks
\n" ); document.write( "Now we are told that:
\n" ); document.write( "x+y+z=100------------------------------eq1
\n" ); document.write( "10x+3y+0.5z=100--------------------------eq2 ($ understood)\r
\n" ); document.write( "\n" ); document.write( "Three unknowns and only two equations which means there will have to be some trial and error and maybe more than one solution.
\n" ); document.write( "Multiply eq2 by 2 (and we get 20x+6y+z=200) and then subtract eq1 from it and we get:
\n" ); document.write( "19x+5y=100 or
\n" ); document.write( "5y=100-19x divide each side by 5
\n" ); document.write( "y=(100-19x)/5--------------------------eq3\r
\n" ); document.write( "\n" ); document.write( "Now eq3 gives us a relationship between the number of pigs,y, and the number of cows, x.\r
\n" ); document.write( "\n" ); document.write( "What do we know about this problem:
\n" ); document.write( "First, we know that we cannot have a negative cow, pig or cluck--we deal in positive numbers.
\n" ); document.write( "Secondly, we know that we cannot have a fraction of a cow, pig or cluck--we deal in whole numbers.\r
\n" ); document.write( "\n" ); document.write( "Given the above constraints, we immediately see from eq3 that we cannot have more than 5 cows otherwise we start having negative pigs which is a no-no.
\n" ); document.write( "Now lets make a chart for cows and pics\r
\n" ); document.write( "\n" ); document.write( "cows 5--pigs=(100-19*5)/5=1------------------BINGO!!!!
\n" ); document.write( "NOW WE plug these values into eq1 and see if the chicks come out ok:\r
\n" ); document.write( "\n" ); document.write( "5+1+z=100
\n" ); document.write( "z=100-6=94 chicks
\n" ); document.write( "Tis gives us the 100 animals, next we wil see if the dollars work out by plugging these into eq2
\n" ); document.write( "10*5+3*1+94*0.5=100
\n" ); document.write( "50+3+47=100
\n" ); document.write( "100=100
\n" ); document.write( "So, we know that one answer is:
\n" ); document.write( "10 cows
\n" ); document.write( "1 pig
\n" ); document.write( "94 clucks\r
\n" ); document.write( "\n" ); document.write( "There may be other answers, you can check.
\n" ); document.write( "Hope this helps---ptaylor
\n" ); document.write( "
\n" );