Skip to content

xdvraj/MiniCalculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Mini Calculator

A simple and intuitive web-based calculator built using HTML, CSS, and JavaScript. This mini calculator can perform basic arithmetic operations including addition, subtraction, multiplication, and division, with live updates to show the current operation and result.


Features

  • Basic Arithmetic Operations: Add, subtract, multiply, and divide numbers.
  • Live Updates: Displays the current operation being performed and the result dynamically.
  • Clear Function: Resets the result to 0 and clears the current operation.
  • Responsive: Fully functional on desktop and mobile devices.
  • Handles Division by Zero: Alerts the user when attempting to divide by zero.

Demo

You can view the demo of the calculator in action by visiting the Live Demo


Screenshots

Here are a couple of screenshots of how the calculator looks:

Calculator Screenshot


Getting Started

To run this project locally on your machine, follow these steps:

Prerequisites

  • A web browser (Chrome, Firefox, Safari, etc.) to run the HTML file.
  • A code editor (VS Code, Sublime Text, etc.) to modify the code if needed.

Running the Project

  1. Clone the repository to your local machine:

    git clone https://github.com/yourusername/mini-calculator.git
    
  2. Navigate to the project folder:

    cd mini-calculator
    
  3. Open the index.html file in your web browser to start using the calculator.

Technologies Used

  • HTML: For structuring the page.
  • CSS: For styling the layout and buttons.
  • JavaScript: For implementing the functionality of the calculator.

How It Works

  • Basic Operations: When you input a number and press an operation button (add, subtract, multiply, divide), the current operation is displayed along with the result.
  • Live Calculation: After each operation, the result is updated instantly on the screen.
  • Clear Button: Clicking the clear button resets the calculator to its initial state, clearing all values and operations.
  • Division by Zero: If the user attempts to divide by zero, an alert is shown to inform them that division by zero is not allowed.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published