This project is a simple calculator implemented using HTML, CSS, and JavaScript. It allows users to perform basic arithmetic operations, view computation history, and clear the history.
- Addition (
+) - Subtraction (
-) - Multiplication (
*) - Division (
÷) - Percentage (
%) - Toggle Sign (
+/-) - Clear All (
AC) - Delete Last Entry (
DE) - Decimal Point (
.)
- Users can view a history of their computations.
- The history is limited to the last 10 entries.
- Users can clear the computation history by clicking the "Clear History" button.
- Users can toggle the visibility of the computation history by clicking the "History" button.
-
Performing Calculations
- Click on the digits (
0-9) to input numbers. - Use the arithmetic operation buttons (
+, -, *, ÷, %) for calculations. - Click the "=" button to see the result on the screen.
- Use the "AC" button to clear all entries.
- Use the "DE" button to delete the last entry.
- Toggle the sign of a number using the "+/-" button.
- Add decimal points using the "." button.
- Click on the digits (
-
Viewing Computation History
- Click on the "history" button to toggle the visibility of the computation history.
- The history displays the last 10 computation entries.
-
Clearing History
- Click on the "Clear History" button to remove all computation history.
-
HTML (
index.html):- Defines the structure of the calculator and computation history.
- Includes necessary elements and classes.
-
CSS (
index.css):- Styles the calculator and computation history elements.
- Implements transitions and animations for a smoother user experience.
-
JavaScript (
index.js):- Defines functionality for the calculator operations.
- Handles user interactions and updates the screen accordingly.
- Manages computation history and its visibility.
- The project has no external dependencies and runs on basic HTML, CSS, and JavaScript.
- This project is open for contributions.
- Feel free to enhance and extend the functionality.
- Follow common coding standards and practices.
- Submit pull requests for review.