Skip to content

Latest commit

 

History

History
68 lines (48 loc) · 1.28 KB

File metadata and controls

68 lines (48 loc) · 1.28 KB

🔢 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