Code Monkey home page Code Monkey logo

calculator's Introduction

Calculator

Overview

This project is a simple, responsive calculator web application that supports basic arithmetic operations. The calculator is designed to work seamlessly across various screen sizes, from mobile devices to desktop screens. It includes a dark mode toggle for better accessibility and user experience.

Features

  • Basic arithmetic operations: addition, subtraction, multiplication, and division.
  • Clear (AC) and delete (DEL) functions.
  • Percentage calculation.
  • Responsive design for all screen sizes.
  • Dark mode toggle.

Technologies Used

  • HTML
  • CSS
  • JavaScript
  • Bootstrap Icons

Getting Started

Prerequisites

To run this project locally, you need a web browser (like Chrome, Firefox, or Safari).

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/calculator.git
  2. Navigate to the project directory:

    cd calculator
  3. Open index.html in your preferred web browser:

    open index.html

Project Structure

  • index.html: The main HTML file containing the structure of the calculator.
  • style.css: The CSS file containing styles for the calculator.
  • calculator.js: The JavaScript file containing the functionality for the calculator.

Usage

  1. Open the calculator in your web browser.
  2. Use the buttons to perform arithmetic operations:
    • AC: Clear the input.
    • %: Calculate the percentage.
    • DEL: Delete the last digit.
    • + - * /: Perform addition, subtraction, multiplication, and division.
    • Dark Mode: Toggle the dark mode using the sun icon at the top.

Customization

You can customize the calculator by modifying the CSS and JavaScript files:

  • CSS: Adjust styles in style.css to change the appearance.
  • JavaScript: Modify calculator.js to change the functionality.

Contributing

Contributions are welcome! Please fork this repository and submit a pull request for any improvements or bug fixes.

  1. Fork the repository.

  2. Create a new branch:

    git checkout -b feature/your-feature-name
  3. Make your changes and commit them:

    git commit -m 'Add some feature'
  4. Push to the branch:

    git push origin feature/your-feature-name
  5. Open a pull request.

Acknowledgments

  • Thanks to Bootstrap Icons for the icon set.
  • Inspired by basic calculator designs and tutorials.

calculator's People

Contributors

sidasif avatar

Watchers

 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.