Giter Club home page Giter Club logo

calculator's Introduction

On-Screen Calculator

Welcome to the On-Screen Calculator project! This project is an implementation of a calculator using JavaScript, HTML, and CSS. It allows users to perform basic arithmetic operations conveniently on a web page.

Features

  • Basic Operations: Addition, Subtraction, Multiplication, and Division.
  • Decimal Point: Users can input decimal numbers.
  • Backspace: Undo the last input.
  • Keyboard Support: Full support for keyboard input (numbers, operators, decimal point, backspace, clear, and equals).
  • Clear Button: Resets the calculator to its initial state.
  • Error Handling: Displays error messages for division by zero.
  • Responsive Design: Simple and clean layout designed for easy use on different devices.

Getting Started

To run the calculator locally on your machine, follow these steps:

  1. Clone the repository:

    git clone https://github.com/your-username/on-screen-calculator.git
    cd on-screen-calculator
  2. Open index.html in your web browser.

  3. Calculator Interface:

    • Use mouse clicks or keyboard inputs to interact with the calculator.
    • Click on number buttons to input numbers.
    • Click on operator buttons (+, -, *, /) to select an operation.
    • Use the decimal button (.) to input decimal points.
    • Click on the equals button (=) or press Enter to compute the result.
    • Press the clear button (Clear) to reset the calculator.
  4. Keyboard Shortcuts:

    • Use numeric keys (0-9) for numbers.
    • Use operator keys (+, -, *, /) for operations.
    • Use the decimal key (.) for decimal points.
    • Use the Enter key for equals (=).
    • Use the Escape key for clear (Clear).
    • Use the Backspace key for undo (Backspace).
  5. Enjoy calculating!

Demo

You can view a live demo of the On-Screen Calculator here.

Contributing

Contributions are welcome! If you have any suggestions, enhancements, or bug fixes, please open an issue or create a pull request.

License

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

calculator's People

Watchers

Christopher Njihia avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.