CSC 269 Programming Project.
Due Monday July 22, 2002.
-
The textbook discusses the problem of converting an infix epression
to postfix, using a stack, starting on page 105.
-
Write a program to implement an infix-to-postifx algorithm using a stack.
-
Variables will be letters, just as in the textbook.
Operators will be +, -, *, /. The usual operator precedences will apply.
Parentheses are used in the usual way.
A unary minus sign will be allowed in the input.
In the output, use the tilde symbol
to denote negation, to avoid ambiguity. Thus, if the input string is
"-(x-y)" the output string will be "xy-~"
-
Use an appropirate modification of the stack algorithm given in the
textbook. You may implement your stack as either a linked list or an
array.
-
Email your source program to Chin Liu by midnight, Monday, July 22.
-
I don't want anyone's program to resemble anyone else's program. Try to
be unique.
