Simple Calculator Web App

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.

Demo

You can access the Simple Calculator Web App by clicking on the following link: Simple Calculator Web App

Code Structure

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.

Features

The calculator web app includes the following features:

  1. Clear Functionality: The "AC" button clears both the input and output displays.
  2. Backspace Functionality: The "<" button removes the last character from the input.
  3. Brackets Functionality: The "( )" button adds or removes parentheses in the input for grouping expressions.
  4. Percentage Calculation: The calculator handles percentage calculations correctly.
  5. Display Formatting: The input and output displays are formatted for better visualization.
  6. Input Validation: The input is validated to prevent consecutive operators or duplicate decimal points.
  7. Perform Calculation: The "=" button evaluates the input expression and displays the result.

Usage

To use the calculator web app:

  1. Open the index.html file in a web browser.
  2. Enter numeric values and use the provided buttons to perform calculations.
  3. The input and output displays will show the entered expression and the calculated result, respectively.

Contributing

Contributions are welcome! If you have any suggestions, improvements, or bug fixes, please feel free to submit a pull request.

Credits

This calculator web app was created by Ali Omar Abdi and Mohamed Abdullahi Hassan.