Campbell Ritchie wrote:What algorithm are you using to determine how to change to RPN (I presume that means Reverse Polish Notation, which I usually call postfix)? How do you turn 1 + 2 × 3 into 1 2 3 × +?
Anayonkar Shivalkar wrote:Hi Pj Hughes,
Welcome to CodeRanch!
Firstly, please ShowSomeEffort. What have you tried till now? Is there any specific step where you are stuck?
Secondly, it would be better to provide links to some not-so-obvious things from your post (e.g. what is Polish Notation, what is shunting yard algorithm etc.).
Also, I would suggest to work with paper and pencil(or pen) first - that is - be very clear about the logic of your code and data structures you need for the same.
I hope this helps.
Rob Spoor wrote:Don't use == for comparing Strings, use the equals method.