document.write( "Question 212822: Matt has 50 cookies to give to his class. There were three kinds of cookies; chocolate chip, M&M, and sugar cookies. There are twice as many sugar cookies as chocolate chip cookies and two more M&M cookies than there are chocolate chip cookies. Write the system and find out how many of each type of cookie he brought. \n" ); document.write( "
Algebra.Com's Answer #160988 by aggie_tutor(13)\"\" \"About 
You can put this solution on YOUR website!
50 = c + m + s\r
\n" ); document.write( "\n" ); document.write( "where c = chocochip, m = M&M and s = sugar.\r
\n" ); document.write( "\n" ); document.write( "Let's get everything in terms of one of the cookies to simplify.\r
\n" ); document.write( "\n" ); document.write( "Sugar cookies twice as many as chocochip: \"s+=+2%2Ac\"\r
\n" ); document.write( "\n" ); document.write( "Two more M&M than chocochip: \"m+=+c+%2B+2\"\r
\n" ); document.write( "\n" ); document.write( "Now express total just in terms of chocochips cookies:
\n" ); document.write( "\"50+=+c+%2B+s+%2B+m\"
\n" ); document.write( "\"50+=+c+%2B+%282%2Ac%29+%2B+%28c%2B2%29\"
\n" ); document.write( "\"50+=+c+%2B+2c+%2B+c+%2B+2\"
\n" ); document.write( "Simplify :
\n" ); document.write( "\"50+=+4c+%2B+2\"
\n" ); document.write( "\"50+%28-2%29+=+4c+%2B+2+%28-2%29\"
\n" ); document.write( "\"48+=+4c\"
\n" ); document.write( "\"48%2F4+=+c\"
\n" ); document.write( "\"c+=+12\"\r
\n" ); document.write( "\n" ); document.write( "Now we know there were 12 chocochip. Plug in this number to find the others.
\n" ); document.write( "\"s+=+2%2Ac+=+2%2A12+=+24\" Sugar cookies
\n" ); document.write( "\"m+=+c%2B2+=+12%2B2+=+14\" M&M cookies\r
\n" ); document.write( "\n" ); document.write( "Check your work by adding them all up:
\n" ); document.write( "24 + 14 + 12 = 50
\n" ); document.write( "
\n" ); document.write( "
\n" );