daniyal_786_simple_calculator
v1.0.0
Published
a simple calculator designed with inquirer chalk and oop
Downloads
4
Readme
Simple Calculator
This is a simple calculator program written in Node.js. It uses the inquirer
package for command line interfaces and the chalk
package for terminal string styling.
Installation
Before running this program, you need to install the necessary Node.js packages. You can do this by running npm install
in the directory containing the program.
Usage
You can run this program by using the command node main.js
. The program will prompt you to enter two numbers and select an operation (add, subtract, multiply, divide, or exponential).
How it works
The program uses a class called Simple_Calculator
which has three properties: firstname
, secondName
, and operator
.
The get_op
method prompts the user to input two numbers and choose an operation. The get_answers
method performs the chosen operation on the two numbers and logs the result to the console.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
License
MIT