How does postfix notation and prefix notation work for exponents because I know how postfix notation works on order of operations for plus, minus, division, multiplication. I would like to know how this works with the use of a stack in a pseudo-code format.

Recommended Answers

Don't understand the question.

Try an example.

Jump to Post

All 2 Replies

Don't understand the question.

Try an example.

2 ^ 3 ^ 4
becomes
2 3 4 ^ ^
because of right to left associativity of exponentiation.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.