Skip to content

achille010/c-calc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

C Language

C Calculator

A simple yet efficient calculator built with the C programming language

Stars License

Overview

C Calculator is a command-line calculator application that demonstrates fundamental programming concepts in C. It provides basic arithmetic operations with a clean, user-friendly interface designed for learning and practical use.

Features

  • Basic Arithmetic Operations: Addition, subtraction, multiplication, and division
  • Lightweight: Minimal dependencies and fast execution
  • Educational: Clean code structure ideal for learning C programming
  • Cross-Platform: Compatible with any system that supports a C compiler

Getting Started

Prerequisites

  • GCC compiler (or any C compiler)
  • Terminal/Command Prompt

Installation

  1. Clone the repository:
git clone https://github.com/achille010/c-calc.git
cd c-calc
  1. Compile the program:
gcc calc.c -o calc
  1. Run the calculator:
./calc

On Windows:

calc.exe

Usage

After launching the calculator, follow the on-screen prompts to perform calculations. Enter your numbers and select the desired operation when prompted.

Project Structure

c-calc/
├── calc.c          # Main calculator implementation
└── README.md       # Project documentation

Building from Source

To compile with optimizations:

gcc -O2 calc.c -o calc

For debugging:

gcc -g -Wall calc.c -o calc

Contributing

Contributions are welcome! If you'd like to improve the calculator or add new features:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/new-feature)
  3. Commit your changes (git commit -m 'Add some feature')
  4. Push to the branch (git push origin feature/new-feature)
  5. Open a Pull Request

License

This project is open source and available under the MIT License.

Author

achille010

Acknowledgments

Built as a learning project to explore C programming fundamentals and create a practical command-line tool.


Made with </> using C

About

A simple calculator built with C language

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages