Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🧮 Smart Calculator

A sleek and intelligent web-based calculator built using HTML, CSS, and JavaScript, hosted on GitHub Pages.
It’s designed to be fast, responsive, and smart — with proper handling for negative numbers, operator spam prevention, and instant error feedback.


🌐 Live Demo

🔗 View it here → https://naman9104.github.io/Calculator/


🚀 Features

  • ✅ Perform basic arithmetic operations — +, -, *, /, %
  • ✅ Smart operator handling (no ++, */, etc.)
  • ✅ Supports negative numbers like -5 + 4
  • ✅ “Error” clears with one Backspace or Delete click
  • ✅ Works with keyboard inputs
  • ✅ Fully responsive & minimal UI design

🧠 How It Works

The calculator listens for both button clicks and keyboard input,
and uses safe JavaScript logic to evaluate expressions.

It also prevents:

  • Consecutive operator inputs
  • Invalid endings like 5+ or 9*/
  • Starting with invalid symbols (except -)

🧩 Tech Stack

Part Technology
Structure HTML5
Styling CSS3
Logic JavaScript (ES6)
Hosting GitHub Pages

⚙️ Setup Locally

You can run this calculator on your system easily:

# Clone this repository
git clone https://github.com/naman9104/Calculator.git

# Open the folder
cd Calculator

# Run the app
open index.html

About

A simple yet elegant web-based calculator built using HTML, CSS, and JavaScript. It performs all basic arithmetic operations — addition, subtraction, multiplication, and division — with a responsive design and smooth button interactions.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages