1.0.5 • Published 11 months ago

mrshas-cli-simple-calculator v1.0.5

Weekly downloads
-
License
ISC
Repository
github
Last release
11 months ago

CLI Simple Calculator: 🧮


This project is a simple command-line calculator built in TypeScript using the inquirer library for user input.

Features: 🌟


Interactive Interface: The calculator provides a user-friendly interface where users can input numbers and select the desired operation.

Error Handling: It gracefully handles invalid inputs, preventing crashes or unexpected behavior.

TypeScript: The entire project is written in TypeScript, ensuring type safety and better code quality.

Prerequisites: 🛠️


Before running the calculator, ensure you have the following installed:

Node.js: To run the game, you’ll need Node.js installed on your system. You can download it from https://nodejs.org.

TypeScript: The game is written in TypeScript, so you’ll need to install TypeScript. Use the following command in your terminal:

npm install -g typescript

Installation: 🚀


Clone this repository to your local directory:

git clone https://github.com/HasnainDevMaster/CLI-Simple-Calculator.git

Install the dependencies by running the following command in your terminal (cmd):

npm install

Additionally, install inquirer for user input prompts:

npm i inquirer

Installation: NPM:

Simply run the following command in your terminal (cmd):

npx mrshas-cli-simple-calculator

When prompted to install npm packages, press "y" to continue.

Example: 🎯


Enter first number: 10
Enter second number: 20

Select one of the operators to perform action: "Addition"

Result: 30

Do you want to perform another calculation? (yes/no) "Yes"

Enter first number: 15
Enter second number: 10

Select one of the operators to perform action: "Subtraction"

Result: 5

Do you want to perform another calculation? (yes/no) "No"

Thank you for using the calculator!

Note: 📝


Make sure you have Node.js installed on your machine to run this application. This calculator only accepts integers as input. Supported basic arithmetic operations: addition, subtraction, multiplication, and division.

Happy coding! 🚀

1.0.5

11 months ago

1.0.4

11 months ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.0

1 year ago