
Write a program that calculates multiple formulas (includes parentheses but not symbols) simultaneously, converting each formula into postfix in order of priority from a file or keyboard. (Agilent: Convert the infix to postfix and then run the calculation. As with the algorithms on pages 29 to 30, we convert to postfix and do calculations at the same time.) (1) There may be parentheses. (2) Operand shall be a numerical constant. (3) Operator consists of +,-, *, / and % (the rest). (4) Use the operator stack and two operand stacks. (To Array or Linked List) Implement stacks.) (5) Use pop0 and push0 on the stack. (6) An error message shall be printed on a formula that cannot be calculatecd (e.g. last time there is more than one number left in the stack If the speaker stack pops up, there is nothing in the operand stack, etc) (7) When dealing with logical operators such as equal sign () inequality (, ), etc. Grants bonus points. (+10 points) (8) Implement C++.