Skip to content

tnoff/cl-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 

Repository files navigation

cl-calculator

Overview

Command Line Calculator

Solves Following Operations: + - / * ^

Solves Paren ()

Supoorts double numbers and negatives

Extras:

K is converted to *2^10

M is converted to *2^20

G is converted to *2^30

IE 2K - 1 is converted to 2*1024 - 1

Compile Steps

$ gcc calc.c -lm -o calc

Sample Usage

$ ./calc 2+3
2+3=5

# Must use quotes with Paren
$ ./calc '(2+3) - (24-1.5)'

Releases

No releases published

Packages

No packages published

Languages