document.write( "Question 37847: A vinding machine has $41.25 in it. there are 255 coins total and the machine only accepts nickels, dimes and quarters. There are twice as many dimes as nickels. How many of each coin are in the machine? \n" ); document.write( "
Algebra.Com's Answer #23373 by fractalier(6550)\"\" \"About 
You can put this solution on YOUR website!
Let N = # of nickels
\n" ); document.write( "Let D = # of dimes
\n" ); document.write( "Let Q = # of quarters
\n" ); document.write( "Thus we know
\n" ); document.write( "N + D + Q = 255
\n" ); document.write( "and for our value equation, we have
\n" ); document.write( "5N + 10D + 25Q = 4125 (no decimal since we're talking cents here)
\n" ); document.write( "plus we know that
\n" ); document.write( "D = 2N
\n" ); document.write( "so substitute that in to both equations and get
\n" ); document.write( "N + 2N + Q = 255
\n" ); document.write( "5N + 20N + 25Q = 4125
\n" ); document.write( "and
\n" ); document.write( "3N + Q = 255
\n" ); document.write( "25N + 25Q = 4125
\n" ); document.write( "Now solve for Q in the first and substitute into the second...
\n" ); document.write( "Q = -3N + 255
\n" ); document.write( "25N + 25(-3N + 255) = 4125
\n" ); document.write( "25N - 75N + 6375 = 4125
\n" ); document.write( "-50N = -2250
\n" ); document.write( "N = 45
\n" ); document.write( "Thus D = 2N = 90
\n" ); document.write( "and Q = 255 - N - D = 120
\n" ); document.write( "
\n" );