Skip to content

Latest commit

 

History

History

Lab 2

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Problem statement

Implement a desk calculator using operator precedence parsing.

How to run

$ g++ main.cpp
$ ./a.out
$ 6+(5*3-(10/5))
> 19

Notes

  • Negative values are not handled. i.e. 5-9 is good but -4 is not.
  • Supported operations addition, substraction, multiply, divide.
  • Brackets () are supported.