Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

calculator

Usage

1 Basic Operations:

  • 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.

2 Using π (pi):

  • Click the π button to insert π into the calculation.
  • π is approximated as Math.PI in calculations.

Example

  1. Click 7, +, 3, = to get 10.
  2. Click 5, *, π, = to get approximately 15.70796327.

Code Overview

  • 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.

File Structure

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.

Contributing

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.

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Commit your changes (git commit -am 'Add new feature').
  4. Push to the branch (git push origin feature-branch).
  5. Create a new Pull Request.

About

A fancy looking calculator to hone my skill with html css and js it perform various simple operations and was cool to make

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages