https://github.com/xavier-berthiaume/cli-calc
A small console-based calculator written entirely in C++
https://github.com/xavier-berthiaume/cli-calc
cpp ncurses
Last synced: 10 months ago
JSON representation
A small console-based calculator written entirely in C++
- Host: GitHub
- URL: https://github.com/xavier-berthiaume/cli-calc
- Owner: xavier-berthiaume
- Created: 2023-12-10T03:01:45.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-05T00:31:06.000Z (over 1 year ago)
- Last Synced: 2025-03-27T10:32:47.632Z (over 1 year ago)
- Topics: cpp, ncurses
- Language: C++
- Homepage:
- Size: 46.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Fullscreen Adaptive CLI Calculator ๐ฉ
A versatile command-line calculator built with C++ and powered by ncurses, offering a fullscreen adaptive interface that adjusts seamlessly to your console size. Perform basic arithmetic operations with ease in a dynamic and visually appealing environment.
๐ Features
Responsive Interface: Automatically adapts to your terminal size for an optimal user experience.
Comprehensive Operations:
1. Addition (+)
2. Subtraction (-)
3. Multiplication (ร)
4. Division (รท)
5. Modulus (%)
Keyboard Navigation: Intuitive key bindings for effortless input and operation selection.
Real-Time Feedback: Instantly see your results displayed in a fullscreen calculator layout.
๐ ๏ธ Built With
C++: Leveraging object-oriented principles for robust and efficient computation.
ncurses: Creating a dynamic text-based interface that mimics a graphical UI.
๐ฆ Installation
Clone the repository:
git clone https://github.com/xavier-berthiaume/cli-calc
Navigate to the project directory and create a build folder:
cd cli-calc
mkdir build
Build the program with CMake:
cmake -S . -B ./build
cd build
Compile the program:
make
Run the calculator:
./cli-calc
๐ Usage
Launch the calculator in your terminal at any time.
The interface is simple enough to navigate, and a help menu is included.
To clear the registers (the calculators memory), simply use the 'c' key
on the keyboard, otherwise enter numbers using the appropriate keys. The
supported operations are addition (+), substraction (-), multiplication (*),
division (/) and modulus (%).
๐ค Contributing
Contributions are welcome! If you'd like to improve the project, please:
1. Fork the repository.
2. Create a new branch (feature/your-feature-name).
3. Commit your changes and submit a pull request.
๐ License
This project is licensed under the MIT License.
๐งโ๐ป Author
This project was written by me, Xavier Berthiaume.
Feel free to connect with me on LinkedIn or check out more of my work on GitHub.