1.0.4 • Published 3 years ago

wmd-ts-calculator v1.0.4

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Command Line Calculator (TS)

A CLI based calculator using typescript and published as an executable npm package, complete problem statement is available here.

NPM Package

Usage

This project is published as an npm package. To use follow these steps.

  • Install as an npm package
npm install wmd-ts-calculator
  • Run the app after installation
wmd-ts-calculator
  • Use the app as an npx package
npx wmd-ts-calculator

Instructions

This CLI based calculator can help you perform any of the following operations.

Sr. No.OperatorDescriptionExample
01+Add two numbersx + y
02-Subtract a number from otherx - y
03*Multiply two numbersx * y
04/Divide a number by otherx / y
05%Percentage of a numberx % of y
06+/-Alternate sign of a number+/- (x)
07**Square of a numberx ** 2
08^Find power of a numberx ^ y
09sqrtSquare Root of a numbersqrt(x)
101/xReciprocal of a number1/x

Note :

  • Result of each operation is input for the next one.
  • Clear and start over for new operation
  • Undo last operation if something goes wrong

Demo

Steps to code CLI calculator

All the details to code this app is given here.