‹ Back to the paper
Convert the following infix notation to postfix form.
Convert the following infix notation to postfix form.
$(P + Q * R - S) / T * U$
Answer
Answer
AI$(P + Q * R - S) / T * U$
Using operator precedence ($*,/$ before $+,-$, left to right) and converting inside-out:
Inner $(P + Q*R - S) \to P\ Q\ R\ *\ +\ S\ -$
Divide by T: $P\ Q\ R\ *\ +\ S\ -\ T\ /$
Multiply by U:
Postfix: $P\ Q\ R\ *\ +\ S\ -\ T\ /\ U\ *$
From ISC 2024 Computer Science Paper 1, question 2(i).