The reverse polish notation equivalent to the infix expression ((A + B) * C +…
2014
The reverse polish notation equivalent to the infix expression
((A + B) * C + D)/(E + F + G)
- A.
A B + C * D + EF + G + /
- B.
A B + C D * + E F + G + /
- C.
A B + C * D + E F G + +/
- D.
A B + C * D + E + F G + /
Attempted by 628 students.
Show answer & explanation
Correct answer: A
Final reverse polish notation: A B + C * D + E F + G + /
Conversion steps:
Convert the numerator ((A + B) * C + D): compute A B + (for A + B), then multiply that result by C to get A B + C *, then add D to get A B + C * D +.
Convert the denominator (E + F + G): using left-associative addition, write E F + G + (this is equivalent to E F G + + as well).
Place the denominator after the numerator and apply the division operator: A B + C * D + E F + G + /.
Note: Ensure operators and operands are separated by spaces so each token is unambiguous.