This is a simple calculator program implemented using HTML, CSS, and JavaScript. It allows users to perform basic arithmetic operations such as addition, subtraction, multiplication, and division.
- User-friendly interface with responsive design.
- Buttons for numbers (0-9), decimal point, and arithmetic operators (+, -, *, /).
- Clear button to reset the calculation.
- Uses local storage to persist the calculation across sessions.
- Clone or download the repository to your local machine.
- Open the
index.html
file in your web browser. - Use the buttons to input numbers and perform calculations.
- Click the "=" button to see the result.
- Use the "Clear" button to reset the calculation.
index.html
: Contains the HTML structure of the calculator.style.css
: Defines the styles for the calculator interface.script.js
: Contains the JavaScript code for handling calculations and user interactions.
- The
updateCalculation(value)
function inscript.js
updates the calculation string based on user input. - The
displayResult(message)
function displays the calculation result in the designated paragraph. - Local storage is used to store and retrieve the calculation, ensuring persistence across page reloads.