This is a simple calculator application built using HTML, CSS, and JavaScript. It features both light and dark modes, a responsive layout, and a toggle switch to change themes. The calculator supports basic arithmetic operations and a history display.
- Light and dark mode toggle
- Basic arithmetic operations: addition, subtraction, multiplication, division, percentage
- History display
- Responsive design
- Clear and delete functions
Check out the live demo of the calculator application here.
-
Clone the repository:
git clone https://github.com/krishna09-dev/calculator.git
-
Navigate to the project directory:
cd calculator -
Open
index.htmlin your browser to view the calculator.
- Clear (
C): Clears the current input and history. - Delete (
<i class="fa-solid fa-delete-left"></i>): Deletes the last character in the current input. - Percentage (
%): Calculates the percentage of the current input. - Operators (
/,*,-,+): Perform basic arithmetic operations. - Equal (
=): Calculates the result of the current input.
- Use the toggle switch to switch between light and dark mode. The calculator will apply the respective styles.
Contributions are welcome! Please fork the repository and submit a pull request for any changes.
- Fork the repository
- Create a new branch:
git checkout -b feature-branch - Commit your changes:
git commit -m 'Add some feature' - Push to the branch:
git push origin feature-branch - Open a pull request