c-calc is a lightweight command-line calculator written in C. It runs on Linux, macOS, and Windows (via MSYS2), and supports two modes of operation: an interactive prompt-driven mode and a non-interactive mode where you pass operands and an operator directly as arguments.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Project516/c-calc/llms.txt
Use this file to discover all available pages before exploring further.
Installation
Install GCC and build c-calc from source in a few steps
Quickstart
Run your first calculation in under a minute
Interactive mode
Use c-calc with step-by-step prompts for operands and operator
Non-interactive mode
Pass arguments directly on the command line for scripting
What c-calc supports
c-calc performs arithmetic on two numbers using a single operator. Results are always displayed with four decimal places.Addition
+ — sum of two numbersSubtraction
- — difference of two numbersMultiplication
* — product of two numbersDivision
/ — quotient of two numbersModulo
% — remainder of integer divisionDivision by zero is handled gracefully — c-calc prints an error message instead of crashing.
Get started
Install GCC
Install the GCC compiler for your platform. On Linux use your package manager, on macOS use Homebrew, and on Windows use MSYS2.