node-cli-calculator
v1.0.3
Published
updated SHABANG
Downloads
4
Readme
Interactive-CLI-Calculator
This project offers a user-friendly command-line interface (CLI) calculator powered by Inquirer, allowing you to perform calculations with ease.
Features:
- Supports addition, subtraction, multiplication, division, and modulus operations.
- Handles both positive and negative numbers.
- Provides an interactive interface for user input through Inquirer.
Installation:
Prerequisites:
- Node.js and npm (Node Package Manager) must be installed on your system. Download them from the official Node.js website: https://nodejs.org/en/
Installation Steps:
Clone the Repository: Use Git to clone this repository to your local machine:
git clone https://NotAnonymousUser/Interactive-CLI-Calculator.git
Install Dependencies: Navigate to the cloned project directory and run the following command to install required packages:
npm install inquirer
Usage:
Run the Script: Open your terminal or command prompt and navigate to the project directory. Then, execute the following command to start the calculator:
node main.js
Enter Numbers: The script will prompt you to enter two numbers using Inquirer. Type the first number and press Enter, then enter the second number and press Enter again.
Choose Operation: Select the desired operation from the displayed options (addition, subtraction, multiplication, division, or modulus) using the arrow keys on your keyboard and press Enter to confirm.
View Result: The application will calculate the result and display it on your screen.
Example Output:
Enter first number: 10
Enter second number: 5
What operation would you like to perform?
+ Add
- Subtract
* Multiply
/ Divide
% Modulus
> *
The result is: 50
Contributing:
We welcome contributions to this project! Feel free to:
- Create pull requests on GitHub to add new features or fix bugs.
- Open issues on GitHub to report any problems or suggest improvements.
Author: Muhammad Mubeen Javaid