Skip to content

TScom-dew/calculatorProgram-using-c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”’ Arithmetic Calculator in C

A fully functional command-line based Arithmetic Calculator built using C programming language.
This project demonstrates structured programming, operator mapping using enum and struct, and clean input validation techniques.


πŸš€ Features

  • Basic Operations (+, βˆ’, Γ—, Γ·, %)
  • Power & Square Root
  • Trigonometric Functions (sin, cos, tan)
  • Inverse Trigonometric Functions
  • Logarithm (base 10)
  • Factorial
  • Operator Mapping using enum & struct
  • Input Validation using fgets & sscanf
  • Clean modular function design

πŸ›  Technologies Used

  • C Programming
  • Standard Libraries:
    • stdio.h
    • stdlib.h
    • string.h
    • math.h
    • ctype.h
    • stdbool.h

🧠 Key Concepts Implemented

  • Function-based modular programming
  • Enum for operation handling
  • Struct-based mapping table
  • Switch-case execution control
  • Error handling & validation
  • Loop-driven user interaction

β–Ά How to Run

  1. Compile the program:

Run:gcc calculator.c -o calculator

πŸ“Œ Learning Outcome

This project improved my understanding of:

  • Clean code structuring
  • Mapping logic implementation
  • Handling user input safely
  • Designing scalable command-line tools

πŸ‘¨β€πŸ’» Author

Ashlok Kumar
C Programming Enthusiast

About

Learning C programming

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages