A collection of lightweight terminal utilities written in C. These projects focus on efficiency and clear functional logic for mathematical calculations and unit conversions.
Objective: Calculate the geometric properties of a circle.
- Functionality: Computes Area, Circumference, Surface Area and Diameter based on user-provided radius.
-
Mathematical Basis: Uses standard geometric formulas (
$A = \pi r^2$ ;$C = 2\pi r$ ).
Objective: Project investment growth over time.
- Functionality: Calculates the final balance based on principal, interest rate, time duration, and compounding frequency.
-
Mathematical Basis: Implements the formula
$A = P(1 + \frac{r}{n})^{nt}$ .
Objective: Convert mass measurements between Metric and Imperial systems.
- Functionality: Handles conversions between kilograms/grams and pounds/ounces.
- Mathematical Basis: Uses high-precision conversion constants.
Objective: Provide quick unit transitions between temperature scales.
- Functionality: Supports bi-directional conversion between Celsius, Fahrenheit and Kelvin.
- Mathematical Basis: Uses precise floating-point arithmetic for accurate scaling.
- Performance-Oriented: Written to minimize overhead and maximize execution speed.
- Portability: Adheres to standard C libraries for compatibility across different environments.
- Minimalist Logic: Focuses on clear, direct implementation of tasks.
To compile and run any of these projects using the provided Makefile:
$ make <project_name>
$ make circle-calculator
$ make temperature-converterAlternatively, navigate to the specific directory and use gcc or clang:
- using gcc
$ gcc main.c -o output_binary -lm
$ ./output_binary- using clang
$ clang main.c -o output_binary -lm
$ ./output_binary