- Click on number buttons (0-9) to enter numbers.
- Click on operator buttons (+, -, *, /, %) to set the operation.
- Press = to calculate the result.
- Press C to clear the current input and reset the calculator.
- Click the π button to insert π into the calculation.
- π is approximated as Math.PI in calculations.
- Click
7,+,3, = to get10. - Click
5,*,π, = to get approximately15.70796327.
- HTML: Defines the structure and layout of the calculator.
- CSS: Styles the calculator to make it visually appealing and - - user-friendly.
- JavaScript: Handles the logic for input processing, arithmetic operations, and display updates.
calculator/
├── index.html
├── styles.css
└── script.js
index.html: Contains the HTML structure for the calculator.styles.css: Contains the CSS styles for the calculator.script.js: Contains the JavaScript code to handle functionality.
Contributions are welcome! If you have suggestions or improvements, please fork the repository and submit a pull request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository.
- Create a new branch (git checkout -b feature-branch).
- Commit your changes (git commit -am 'Add new feature').
- Push to the branch (git push origin feature-branch).
- Create a new Pull Request.