Project for Students @ Qwasar Silicon Valley
Created by: Ethan Scully
Create a program that emulates some of the functionality of bc.
my_bc accepts a string containing an infix math problem and returns and prints the result. my_bc only accpts the operators for:
- multiplication (*)
- division (/)
- modulo (%)
- addition (+)
- and subtraction (-)
It also accepts correctly closed parentheses (()).
To install, simply run make
in the root directory my_bc
.
$ make
To solve a problem using my_bc, run the following command with your math problem between ""
marks in the program's root folder after install, as shown below.
$ ./my_bc "(3 − 4) × 5"