Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Calculator Project

A modern, responsive calculator built with HTML, CSS, and JavaScript as part of The Odin Project curriculum.

Features

  • Basic arithmetic operations (addition, subtraction, multiplication, division)
  • Decimal number support
  • Keyboard input support
  • Backspace functionality
  • Clear (AC) button
  • Error handling for division by zero
  • Responsive design with hover effects
  • Clean, modern UI with gradient background

Keyboard Shortcuts

  • Numbers (0-9): Input numbers
  • Operators (+, -, *, /): Perform operations
  • Enter or =: Calculate result
  • Escape: Clear calculator
  • Backspace: Delete last input
  • Decimal (.): Add decimal point

Usage

  1. Open index.html in a web browser
  2. Use mouse clicks or keyboard input to:
    • Enter numbers
    • Perform calculations
    • Clear the display
    • Delete last input

Technical Details

  • Uses CSS Grid for calculator layout
  • Implements class-based JavaScript for calculator logic
  • Includes error handling and input validation
  • Rounds long decimal results to prevent display overflow

Future Improvements

  • Add memory functions (M+, M-, MR, MC)
  • Implement scientific calculator functions
  • Add history of calculations
  • Add theme switcher

About

Project: Modern Calculator

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages