https://github.com/cheapnightbot/calc
Stumid Cheap Calculator ~
https://github.com/cheapnightbot/calc
Last synced: 25 days ago
JSON representation
Stumid Cheap Calculator ~
- Host: GitHub
- URL: https://github.com/cheapnightbot/calc
- Owner: CheapNightbot
- License: mit
- Created: 2024-11-15T01:18:00.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-16T08:22:44.000Z (over 1 year ago)
- Last Synced: 2025-11-27T17:29:46.617Z (7 months ago)
- Language: C
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cheap Calculator ~
A simple and stumid command-line calculator to perform basic arithmetic operations such as addition, subtraction, multiplication, and division. ♡(>ᴗ•)

TABLE OF CONTENTS
- [Features](#features)
- [Installation](#installation)
- [Cleaning Up](#cleaning-up)
- [Usage](#usage)
- [Commands](#commands)
- [Example](#example)
- [Contributing](#contributing)
- [License](#license)
## Features
- Supports the following basic operations:
- `+`: Addition
- `-`: Subtraction
- `*`: Multiplication
- `/`: Division
- `//`: Integer division (round to nearest integer)
- Colorful output.
- Python REPL inspired prompt and feel.
## Installation
> [!NOTE]
> This project uses `gcc` & `make` for building. Ensure you have them installed on your system.
1. Clone this repository:
```bash
git clone https://github.com/CheapNightbot/calc.git
```
2. Navigate into the project directory:
```bash
cd calc
```
3. Build the project:
```bash
make
```
OR
```bash
make calc
```
4. Run the calculator:
```bash
./build/calc
```
### Cleaning Up:
> [!WARNING]
> "This will delete the 'build' directory and the executable!"
To clean up the build files:
```bash
make clean
```
## Usage
### Commands:
- `clear` or `clean`: Clears the terminal screen.
- `exit` or `quit`: Exits the calculator.
- `help`: Displays the help/usage message.
### Example:
```bash
>>> 3 + 4
7
>>> 10 - 4
6
>>> 5 * 5
25
>>> 7 / 3
2.33
>>> 7 // 3
2
```
## Contributing
If you want to contribute, feel free to fork this repository, make your changes, and submit a pull request.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.