Skip to content

Latest commit

 

History

History
24 lines (20 loc) · 377 Bytes

README.md

File metadata and controls

24 lines (20 loc) · 377 Bytes

Basic Calculator

Clone this repository and run make. You will need flex and bison.

Sample output

$ ./calc
a = 400 ^ 2
b = sqrt(a)
b
400.000000
sin(2 * 15)
0.500000
d = c
Variable c was not declared!
Error in calculation
sdf(23/0+d)
Cannot divide by zero!
Variable d was not declared!
Function sdf does not exist!
Error in calculation