prompt-calculator
v0.3.0
Published
A simple calculator written in TypeScript for performing basic arithmetic operations
Downloads
5
Readme
Prompt Calculator
A simple calculator written in TypeScript for performing basic arithmetic operations. This calculator can be used via the command line by running npx prompt-calculator
or by adding it as a dependency with npm i prompt-calculator
.
Installation
To use the calculator, follow these steps:
Install Node.js if you haven't already: Node.js Installation Guide
Open your terminal or command prompt.
Run the following command to install the calculator globally:
npm install -g prompt-calculator
Usage
Open your terminal or command prompt.
To perform calculations, run:
npx prompt-calculator
Follow the prompts to enter the first operand, second operand, and select an arithmetic operator (addition, subtraction, multiplication, or division).
The calculator will display the result based on your input.
Example
$ npx prompt-calculator
? Enter first operand: 10
? Enter Second operand: 5
? Select an arithmetic operator: Addition
Your value is 15
GitHub Repository: Arithmetic Calculator
NPM Package: Arithmetic Calculator
License
This project is licensed under the MIT License - see the LICENSE file for details.
Feel free to explore the code, contribute, and use this calculator in your projects! 🚀🔢
Owner
Sufiyan Tahir