Skip to content

Latest commit

 

History

History
20 lines (15 loc) · 917 Bytes

README.md

File metadata and controls

20 lines (15 loc) · 917 Bytes

Prefix Calculator

This project is a simple Prefix Calculator implemented in Javascript. It uses the readline module to interact with the user via the command line.

Description

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.

Installation

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.

Usage

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.

License

This project is licensed under the Unlicense license.