This project is a simple Prefix Calculator implemented in Javascript.
It uses the readline
module to interact with the user via the command line.
In prefix notation, operators are placed before their operands. For example, '+ 3 4' is equivalent to '3 + 4' in infix notation. This calculator takes a prefix expression as input and calculates the result.
To install the project, follow these steps:
- Clone the repository to your local machine.
- Navigate to the project directory.
- If you don't have Node.js installed, download and install it from here.
- Run
npm ci
to install the necessary dependencies.
To use the calculator, run node prefixCalc.js
in the terminal. You will be prompted to enter a prefix expression. After entering the expression, the result will be displayed.
This project is licensed under the Unlicense license.