document.write( "Question 945195: construct an expression tree for the following expression:
\n" ); document.write( "((1+5)/1-4)*(16+(4*(5-8)))\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "
\n" ); document.write( "

Algebra.Com's Answer #576577 by Edwin McCravy(20066)\"\" \"About 
You can put this solution on YOUR website!
\r\n" );
document.write( "\"%28%28%281%2B5%29%29%2F1-4%29%2A%2816%5E%22%22%2B%284%5E%22%22%2A%285-8%29%29%5E%22%22%29\"\r\n" );
document.write( "\r\n" );
document.write( "Attend to the innermost parentheses that is farthest to the left,\r\n" );
document.write( "so replace (1+5) by 6 and copy everything else over:\r\n" );
document.write( "\r\n" );
document.write( "\"%28%286%29%2F1-4%29%2A%2816%5E%22%22%2B%284%5E%22%22%2A%285-8%29%29%5E%22%22%29\"\r\n" );
document.write( "\r\n" );
document.write( "Attend to the innermost parentheses that is farthest to the left,\r\n" );
document.write( "which is \"%28%286%29%2F1-4%29\", so divide the 6 by the 1, getting 6 and \r\n" );
document.write( "copy everything else over:\r\n" );
document.write( "\r\n" );
document.write( "\"%286-4%29%2A%2816%5E%22%22%2B%284%5E%22%22%2A%285-8%29%29%5E%22%22%29\"\r\n" );
document.write( "\r\n" );
document.write( "Attend to the innermost parentheses that is farthest to the left,\r\n" );
document.write( "which is \"%286-4%29\", so subtract and replace it by 2 and \r\n" );
document.write( "copy everything else over:\r\n" );
document.write( "\r\n" );
document.write( "\"2%2A%2816%5E%22%22%2B%284%5E%22%22%2A%285-8%29%29%5E%22%22%29\"\r\n" );
document.write( "\r\n" );
document.write( "Attend to the innermost parentheses that is farthest to the left,\r\n" );
document.write( "which is \"%285-8%29\", so subtract and replace it by (-3) and \r\n" );
document.write( "copy everything else over:\r\n" );
document.write( "\r\n" );
document.write( "\"2%2A%2816%5E%22%22%2B%284%5E%22%22%2A%28-3%29%29%5E%22%22%29\"\r\n" );
document.write( "\r\n" );
document.write( "Attend to the innermost parentheses that is farthest to the left,\r\n" );
document.write( "which is \"%284%5E%22%22%2A%28-3%29%29\", so multiply and replace it by (-12) and \r\n" );
document.write( "copy everything else over:\r\n" );
document.write( "\r\n" );
document.write( "\"2%2A%2816%5E%22%22%2B%28-12%29%5E%22%22%29\"\r\n" );
document.write( "\r\n" );
document.write( "Attend to the innermost parentheses that is farthest to the left,\r\n" );
document.write( "which is \"%2816%5E%22%22%2B%28-12%29%5E%22%22%29\", so replace it by 4 and \r\n" );
document.write( "copy everything else over:\r\n" );
document.write( "\r\n" );
document.write( "\"2%2A4\"\r\n" );
document.write( "\r\n" );
document.write( "And the final answer is\r\n" );
document.write( "\r\n" );
document.write( "\"8\"\r\n" );
document.write( "\r\n" );
document.write( "Edwin
\n" ); document.write( "
\n" );