An open API service indexing awesome lists of open source software.

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++

Awesome Lists containing this project

README

          


Screenshot of the calculator's UI within the CLI.

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.