Skip to content

NicolasPoupon/Bistro-matic

Repository files navigation

🧮 Bistro-matic - Infinite Calculator

See the subject here

Grade : A

Project description

The goal of this project is to write a program that will display the result of an evaluated mathematical expression. The expression will be composed of infinite integers that can be expressed in any base. The program must handle the following operators: +-*/%, parentheses, operation priorities and syntax errors, but not float numbers.
See man bc

📦 Compilation

make

📋 Examples

./calc -h
# Will display:
# USAGE
# ./calc base operators size_read
# DESCRIPTION
#    - base: all the symbols of the base
#    - operators: the symbols for the parentheses and the 5 operators
#    - size_read: number of characters to be read
echo "3+6" | ./calc 0123456789 "()+-*/%" 3
# Will display 9
echo "3v6" | ./calc 0123456789 "{}vwxyz" 3
# Will display 9

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published