Skip to content

codiing-5/calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Simple Calculator

A lightweight, modern web-based calculator built with HTML, CSS, and JavaScript. Perform basic arithmetic operations with an intuitive user interface.

Features

  • Basic Operations: Addition, subtraction, multiplication, and division
  • 🎨 Modern UI: Clean, responsive design with a gradient background
  • 💾 Decimal Support: Handle decimal calculations with precision
  • Sign Toggle: Easily switch numbers between positive and negative
  • 🔄 Clear Function: Reset calculator with a single click
  • ⚠️ Error Handling: Division by zero protection
  • 📱 Responsive Design: Works seamlessly on desktop and mobile devices

Quick Start

  1. Clone the repository:
git clone https://github.com/codiing-5/calculator.git
cd calculator
  1. Open calculator.html in your web browser

That's it! The calculator is ready to use.

Usage

  • Number Buttons (0-9): Click to input numbers
  • Operators (+, −, ×, ÷): Select an operation
  • Decimal Point (.): Add decimal values
  • Sign Toggle (±): Make numbers positive or negative
  • Equals (=): Calculate the result
  • Clear (C): Reset the calculator

Technologies Used

  • HTML5: Structure and markup
  • CSS3: Styling, animations, and responsive layout
  • JavaScript: Calculator logic and interactivity

File Structure

calculator/
├── calculator.html    # Main application file (HTML, CSS, and JavaScript)
└── README.md         # Documentation

Example Calculations

  • 7 + 3 = 10
  • 15 − 5 = 10
  • 6 × 4 = 24
  • 20 ÷ 4 = 5

Browser Compatibility

Works with all modern browsers including:

  • Chrome
  • Firefox
  • Safari
  • Edge

Future Enhancements

  • Advanced operations (square root, percentage, exponents)
  • Calculation history
  • Keyboard support
  • Dark mode theme
  • Additional number formats

License

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

Contributing

Contributions are welcome! Feel free to fork this repository and submit a pull request with your improvements.


Created by: codiing-5
Last Updated: 2026-04-07

About

a simple calculator using html css and javascript

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages