Calculator CLI

Challenge image cover: Calculator CLI
  • JS

Difficulty:Easy

Create a basic calculator with addition feature.

User Stories

  • User can add multiple numbers using add command.
  • User can add floating numbers using the -f flag.
  • User can add only even/odd numbers using even/odd sub-command.
  • User can use --help or -h flag to get all the available commands and flags.

Note: The stories 1 and 2 are basically for static typed language, where passed arguments must be of same type.

Bonus Features

  • User can use all the basic arithmetic operations like (addition, subtraction, multiplication and divison).
  • User can use --help or -h flag to get the sub-commands of command.
  • Power of and Square Root of operation.

Example projects

More Challenges

Bin2Dec challenge image
  • HTML
  • CSS
  • JS

Difficulty:Easy

Convert binary numbers (up to 8 digits) to decimal effortlessly, providing validation and insights into binary arithmetic concepts.

Calculator challenge image
  • HTML
  • CSS
  • JS

Difficulty:Easy

Create a functional calculator for basic arithmetic with a user-friendly interface, supporting clear operations and error handling.

Border-radius Previewer challenge image
  • HTML
  • CSS
  • JS

Difficulty:Easy

Tool to view, customize and copy CSS border-radius properties, creating simple or complex shapes easily.

See more >