Calculator


Let's make it harder - let's deal with precedence...

Example: 3 / 7 + 5 / 12

Operand Operator TempOperand TempOperator
3      
7 /    
5 +    
12 /    

We always (except with parenthesis) push the Operand/Operator pair to the temp stacks...                  Next Page...

                                         Simple Example...

                                         Complex / Parenthesis Example...