Skip to content

Latest commit

 

History

History

rpm_calculator

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Source

https://codingdojo.org/kata/RPN/

RPN Calculator

An RPN calculator computes expressions written in Reverse Polish Notation.

An RPN expression or postfix expression is one of the following :

a number X, in wich case the value of the expression is that of X, a sequence of form E1 E2 OP where E1 and E2 are RPN expressions and OP is an arithmetic operation. Samples :

20 5 /        => 20/5 = 4
4 2 + 3 -     => (4+2)-3 = 3
3 5 8 * 7 + * => ((5*8)+7)*3 = 141