/RPNCalc

Reverse Polish Notation calculator using Node.js

Primary LanguageJavaScript

RPNCalc

Installation

  1. Install node.js
  2. Clone repository and go into project directory.

Run $ npm install

How to Execute

To start the application use the below command

$ npm run start

  1. To quit the application enter 'q'
  2. To reset the application and start the calculations from the beginning enter 'r'.

Sample Inputs and outputs

6 2 +

8

12

12

4

4

/

3

2 2 3 + *

10

About The App

This application is built using Node.js. Unit tests are not included which can make this application even better. big.js library is used to perform calculations to avoid floating point accuracy error. Regular expression is used for validating the given input expression.