document.write( "Question 251874: A farmer had a herd of 24 animals, some sheep and some goats. He sold the sheep
\n" ); document.write( "for $140 each and the rest of the herd, the goats for $100 each. If he had sold the whole herd at the uniform price of $120 per animal, he would have gained 360
\n" ); document.write( "more dollars. How many goats did he sell?
\n" ); document.write( "

Algebra.Com's Answer #183562 by stanbon(75887)\"\" \"About 
You can put this solution on YOUR website!
A farmer had a herd of 24 animals, some sheep and some goats.
\n" ); document.write( "Whole herd selling income: 24*120 = $2880
\n" ); document.write( "------------------------------------------------
\n" ); document.write( "He sold the sheep for $140 each and the rest of the herd, the goats for $100 each. If he had sold the whole herd at the uniform price of $120 per animal, he would have gained 360 more dollars.
\n" ); document.write( "Equation:
\n" ); document.write( "s + g =24
\n" ); document.write( "140s + 100g = 2880-360
\n" ); document.write( "----------------------------
\n" ); document.write( "s = 24-g
\n" ); document.write( "140s + 100g = 2520
\n" ); document.write( "---
\n" ); document.write( "Substitute for \"s\" and solve for \"g\":
\n" ); document.write( "140(24-g) + 100g = 2520
\n" ); document.write( "140*24 - 140g + 100g = 2520
\n" ); document.write( "-40g = -840
\n" ); document.write( "g = 21 (# of goats)
\n" ); document.write( "Since s = 24-g, s = 24-21 = 3 (# of sheep)
\n" ); document.write( "==============================================
\n" ); document.write( "Cheers,
\n" ); document.write( "Stan H.
\n" ); document.write( "==============================================
\n" ); document.write( "
\n" ); document.write( "
\n" );