This is a simple calculator web app built using HTML, CSS (with Bootstrap), and JavaScript. The calculator allows users to perform basic arithmetic calculations with additional features such as clearing, backspacing, handling brackets, and percentage calculations.
You can access the Simple Calculator Web App by clicking on the following link: Simple Calculator Web App
The code is structured as follows:
- The HTML file (
index.html
) contains the structure and layout of the calculator web app. - The CSS file (
style.css
) defines the styling and appearance of the calculator elements. - The JavaScript file (
main.js
) provides the functionality and interactivity of the calculator.
The calculator web app includes the following features:
- Clear Functionality: The "AC" button clears both the input and output displays.
- Backspace Functionality: The "<" button removes the last character from the input.
- Brackets Functionality: The "( )" button adds or removes parentheses in the input for grouping expressions.
- Percentage Calculation: The calculator handles percentage calculations correctly.
- Display Formatting: The input and output displays are formatted for better visualization.
- Input Validation: The input is validated to prevent consecutive operators or duplicate decimal points.
- Perform Calculation: The "=" button evaluates the input expression and displays the result.
To use the calculator web app:
- Open the
index.html
file in a web browser. - Enter numeric values and use the provided buttons to perform calculations.
- The input and output displays will show the entered expression and the calculated result, respectively.
Contributions are welcome! If you have any suggestions, improvements, or bug fixes, please feel free to submit a pull request.
This calculator web app was created by Ali Omar Abdi and Mohamed Abdullahi Hassan.