Due: Feb. 20, 2001, 11AM by email
This programming assingment will illustrate the use of the stacks in two ways. First, your program should take an input string that is an infix expression, and convert it to postfix. Second, your program should take a postfix expression and evaluate it.
For example, if you input the infix
2 - 3*4 + 5/6
your program should first output the
2 3 4 * - 5 6 / +
and then output the result of evaluating
For extra credit, your infix expression
could contain more complicated operands than single digits (for example,
multidigit integers, or decimal expressions). Other extra credit options
include adding unary operators to the mix (negative number operands, or
exponentiation for example). Talk to me if you have other ideas for
extra credit as well.