Skip to content

ScullyE/my_bc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

my_bc


Project for Students @ Qwasar Silicon Valley

Qwasar Silicon Valley Logo

Created by: Ethan Scully


Task

Create a program that emulates some of the functionality of bc.


Description

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 (()).


Installation

To install, simply run make in the root directory my_bc.

$ make

Usage

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"

Cheers!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published