Skip to content

BhakktiGautam/Simple-Calculator-C

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

#Description:

This project is a console-based calculator implemented in C. It performs basic arithmetic operations including addition, subtraction, multiplication, and division.

The program is structured using separate functions for each operation, making the code modular, readable, and easy to extend.

Features

1.Supports addition, subtraction, multiplication, and division

2.Uses function-based design

3.Handles floating-point calculations

4.Simple and clean console interaction #Concepts Used:

1.Functions

2.Conditional statements (if-else)

3.Input and output operations

4.Floating-point arithmetic

#Program Flow:

User enters two numbers.

User selects the desired operation.

The corresponding function is executed.

The result is displayed on the console.

#Sample Output: Enter the values of 2 numbers: 10 5 Choose operation (+, -, *, /): / Result = 2.00

#How to Compile and Run: gcc calculator.c -o calculator ./calculator

#File Structure :Simple-Calculator-C/ ├── calculator.c └── README.md

Author

Bhakkti Gautam

About

“This C program is a simple calculator that allows users to perform addition, subtraction, multiplication, and division. It uses functions for modular design, handles division by zero, and supports floating-point division. Perfect for beginners looking to strengthen C programming fundamentals and hands-on coding practice.”

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages