Header Ads Widget



Infix to postfix converter

     Online Infix to Postfix Converter

Infix Expression 

 An expression is called Infix Expression if the operators are included between the operands and easily calculated by us.

Example -: (A/ (B-C+D))* (E-G)*C

Postfix Expression

Postfix expression is the notation in which operators are placed after the operands. This notation is easily evaluated and understood by computers.

Example -: ABC-D+/EA-*F*

Infix to Postfix Calculator

Rules to Convert Infix to Post Expression

To convert infix to postfix expression using stack use the following rules:

  1. Read all Characters from left to right in the given Arithmetic expression.
  2. If you get Operand then print it as it is.
  3. If the character is operator or parenthesis then push it into the stack.
  4. If you get an operator then check for the precedence of the operator.
  5. If reading characters have lower precedence over the characters in Stack, then pop out those characters and then push this into the stack.
Pictorial representation of the flow of Program

Infix to postfix converter