Skip to content

Sarthak-cse/Basic-Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

1 Commit
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿงฎ Basic Calculator

A sleek, responsive basic calculator built using HTML, CSS, and JavaScript. It supports basic arithmetic operations and mimics the look and feel of a modern calculator.


๐Ÿš€ Features

  • Responsive, modern UI
  • Basic operations: +, -, ร—, รท
  • AC (All Clear), C (Backspace), +/- toggle
  • Decimal input and real-time display update
  • Error handling for invalid operations

๐Ÿ–ฅ๏ธ Demo Preview

Calculator UI Preview


๐Ÿ› ๏ธ How to Run

  1. Clone the repository:
    git clone https://github.com/your-username/calculator-project.git
    cd calculator-project
  • Open index.html in your browser.

  • Thatโ€™s it! Your calculator should now be running.

๐Ÿ“„ Code Highlights

HTML

  • Semantic layout with a simple structure

  • Uses input field for live display updates

CSS

  • Flexbox and CSS Grid for layout

  • Modern dark theme with button hover effects

JavaScript

Core functions:

  • press(val) for input handling

  • calculate() for expression evaluation

  • Uses eval() with input sanitization

๐Ÿ’ก Future Enhancements

  • โŒจ๏ธ Keyboard input support

  • ๐ŸŒ— Dark/Light mode toggle

  • % Modulo and memory features

  • ๐Ÿงฎ Scientific calculator mode

๐Ÿ“œ License

  • This project is open-sourced under the MIT License.

๐Ÿค Contributions

  • Feel free to fork the repo, submit pull requests, or open issues!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published