calc

Version, currently master branch1 version
  • master branchlatestJan 1, 2019

github.com/MohamedLEGH/crystal-calc

a command-line calculator in crystal lang

0 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  calc:
    github: MohamedLEGH/crystal-calc
    branch: master

master is a branch, not a release, so this tracks it rather than pinning a version.

Then run:

shards install

shard.yml

Crystal
0.27.0
License
MIT
Author
MohamedLEGH
Target
  • calc from src/calc.cr

Dependencies

This version declares no dependencies.

README

calc

a simple command line calculator

Parse the input of the user and compute the result

Installation

git clone https://github.com/MohamedLEGH/crystal-calc
cd calc
crystal build calc.cr

Usage

./calc

calc> 14 + 2 * 3 - 6 / 2
17
calc> 7 + 3 * (10 / (12 / (3 + 1) - 1))
22
calc> 7 + 3 * (10 / (12 / (3 + 1) - 1)) / (2 + 3) - 5 - 3 + (8)
10
calc> 7 + (((3 + 2)))

Development

TODO: Write development instructions here

Contributors

inspired by https://ruslanspivak.com/lsbasi-part1/