Skip to content

EagleTw/yacc_float_calculatior

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yacc_float_calculator

About

This is a compact calculator with floating point

  • calculate real number
  • ‘+’ ‘-’ ‘*’ ‘/’ operation
  • ‘(’ ‘)’ may appear on expression
  • Output to the first digit after the decimal point

Input

2.0 * 2.5
5.0 * (3.5+2)
5.25 * 3

Output

5.0
27.5
15.8

how to run

$ make
$ ./calc