A basic web-based calculator built with HTML, CSS, and JavaScript. This project allows users to perform fundamental arithmetic operations such as addition, subtraction, multiplication, division, and modulus through a simple and intuitive interface.
- Supports basic arithmetic operations: addition (+), subtraction (-), multiplication (*), division (/), and modulus (%).
- Clear button (C) to reset the display.
- Responsive design for use on various screen sizes.
- User-friendly interface with a dark theme and hover effects on buttons. -Error handling for invalid inputs (e.g., division by zero).
- HTML: Structures the calculator's user interface.
- CSS: Styles the layout, display, and buttons for a clean and modern look.
- JavaScript: Implements the calculator's logic, including button interactions and expression evaluation.
- A modern web browser (e.g., Chrome, Firefox, Edge).
- No additional software or dependencies are required.
git clone https://github.com/kesavanaswin/Simple-Calculator.git
cd Simple-Calculator
- Click the number buttons (0-9) to input digits.
- Use the operator buttons (+, -, *, /, %) to build expressions.
- Press the equals button (=) to evaluate the expression.
- Use the clear button (C) to reset the display.
- index.html: Contains the HTML structure for the calculator's interface.
- style.css: Defines the styling for the calculator, including layout and button design.
- script.js: Handles the logic for button clicks, expression evaluation, and error handling.
- Uses JavaScript's eval() function for expression evaluation, which is suitable for this simple application but not recommended for handling untrusted inputs in production environments.
- Limited to basic arithmetic operations; no support for advanced functions like square roots or memory storage.
- Fork the repository.
- Create a new branch (git checkout -b feature-branch).
- Make your changes and commit (git commit -m "Add new feature").
- Push to the branch (git push origin feature-branch).
- Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
- Built as a learning project for web development with HTML, CSS, and JavaScript.
- Inspired by simple calculator designs for educational purposes.