Questions tagged [rpn]

For questions relating to the Reverse Polish Notation, which is a notation for mathematical expressions where the operands precede the operator.

In computing, RPN is ideally suited for a stack-based implementation, and in hardware it has a long history with HP hand-held calculators.

E.g. 1 2 + means apply the + operator to the operands 1 and 2.

198 questions
-4
votes
1 answer

Reverse Polish Notation Challenge - Boolean.getBoolean() vs. Boolean.parseBoolean()

I am trying to solve this question: https://uchicago.kattis.com/problems/uchicago.rpn I've posted the Java code below for reference. EDIT: I've removed the original code as it was too long and not too helpful. I think this post can be useful for…
Mo Aboulmagd
  • 131
  • 2
  • 10
-4
votes
2 answers

Where to place printf to avoid multiple printouts in my rpn calculator?

My rpn-calculator works, but it has a problem. The problem is that it prints out every consecutive calculation that it makes along the way. I have tried different ways of fixing this, the latest one being adding an integer that goes up by every…
Slayahh
  • 373
  • 4
  • 14
-6
votes
1 answer

RPN Problems (Order of Operations)

I'm trying to make a simple calculator with order of operations. I had read in the Internet and found the algorithm of RPN (Reverse Polish notation). EDIT: Lets take an example: 2 * 5 - 3 + 4 Ok, I did as you both said check it out now: Proc is…
YuvalB
  • 1
  • 1
  • 4
1 2 3
13
14