Skip to content

IldhanSec/simple-calculator-c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Simple Calculator πŸ–©

A lightweight and user-friendly calculator built in C for quick and easy arithmetic operations. Designed with simplicity in mind, it runs directly in the command-line interface (CLI), making it perfect for learning, everyday use, or as a foundation for more advanced projects.


✨ Features

  • Basic arithmetic operations: addition, subtraction, multiplication, division, power, and square root
  • Simple CLI interface
  • Lightweight and fast
  • Beginner-friendly source code
  • Cross-platform (works on Linux, macOS, and Windows with a C compiler)
  • Easy to use

πŸš€ Getting Started

1. Clone the repository

git clone https://github.com/IldhanSec/simple-calculator-c.git
cd simple-calculator

2. Compile the program

Using GCC (Linux/macOS/Windows with MinGW):

gcc calcu.c -o calcu -lm

-lm is required to link the math library.

3. Run the program

./calcu

πŸ“ŒNoted

If you don't have a compiler like GCC, it is recommended to install it, 
otherwise the program will not run because it requires a compiler, 
if you are using Windows it is recommended to install minGw because it is one of the C language compilers.

πŸ“– Usage

  1. Launch the program from your terminal.
  2. Select an operation from the menu.
  3. Enter the numbers when prompted.
  4. Instantly get the result.

Example CLI interface:

πŸ–© Simple Calculator πŸ–©
==========================

Select operation:
1. Addition
2. Subtraction
3. Multiplication
4. Division
5. Power
6. Square Root
0. Exit

Enter your choice:

🀝 Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request to improve features, add more operations, or enhance the CLI design.


πŸ“œ License

This project is licensed under the MIT License. See the LICENSE file for details.


⚑ Lightweight. Easy. Fast. Run calculations directly in your terminal.


GitHub Stars GitHub Forks