A simple and stumid command-line calculator to perform basic arithmetic operations such as addition, subtraction, multiplication, and division. ♡(>ᴗ•)
TABLE OF CONTENTS
- Supports the following basic operations:
+
: Addition-
: Subtraction*
: Multiplication/
: Division//
: Integer division (round to nearest integer)
- Colorful output.
- Python REPL inspired prompt and feel.
Note
This project uses gcc
& make
for building. Ensure you have them installed on your system.
-
Clone this repository:
git clone https://github.com/CheapNightbot/calc.git
-
Navigate into the project directory:
cd calc
-
Build the project:
make
OR
make calc
-
Run the calculator:
./build/calc
Warning
"This will delete the 'build' directory and the executable!"
To clean up the build files:
make clean
clear
orclean
: Clears the terminal screen.exit
orquit
: Exits the calculator.help
: Displays the help/usage message.
>>> 3 + 4
7
>>> 10 - 4
6
>>> 5 * 5
25
>>> 7 / 3
2.33
>>> 7 // 3
2
If you want to contribute, feel free to fork this repository, make your changes, and submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.