How to write main program for converting infix to postfix th

How to write main program for converting infix to postfix that allow user to enter as many input as they want ( more than 1 test) and exist when the user enter the empty line?

Solution

Infix Expression :

Notation in which the operator separates its operands. Eg (a + b) * c. Infix notation requires the use of brackets to specify the order of evaluation.

Postfix Expression :

Reverse Polish Notation or Suffix Notation Notation in which the operator follows its operands. Eg a + b * c represented as abc*+.

Infix to Postfix Conversion Algo :

code:

Post Fix Expression Evaluation



Now after making the conversion what we have gained. As PostFix strings are parenthesis-free notation mathematical calculations and precedence is already defined within the string and so calculation is done very easily.

Postfix Expression evaluation Algo :

code:

How to write main program for converting infix to postfix that allow user to enter as many input as they want ( more than 1 test) and exist when the user enter

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site