📱 Basic Calculator

This calculator supports basic arithmetic operations and includes several utility functions.
🖥️ Display
- Top display screen shows the current input or result.
- Starts with 0 and updates as you enter numbers and operations.
🧮 Button Functions
🔘 Top Row
| Button | Function |
|---|---|
| AC | Clears all input and resets the calculator to 0 |
| ± | Toggles the sign of the current number (positive/negative) |
| % | Converts the current number to a percentage (divides by 100) |
| ÷ | Division operation |
🔢 Number Buttons (0–9)
- Used to input numeric values.
✖️ ➕ ➖ Arithmetic Operations
| Button | Function |
|---|---|
| × | Multiplication |
| − | Subtraction |
| + | Addition |
⬇️ Bottom Row
| Button | Function |
|---|---|
| 0 | Input the number 0 |
| . | Adds a decimal point to input a floating-point number |
| = | Calculates the result based on entered expression |
📝 Example Usage
-
Addition: Tap
2, then+, then3, then=→ Display shows 5 -
Percentage: Tap
50, then%→ Display shows 0.5 -
Change Sign: Tap
9, then±→ Display shows -9 -
Clear All: Tap
AC→ Display resets to 0
📌 Notes
- Only one operation can be performed at a time (e.g., no parentheses or order of operations).
- Decimal calculations are supported.
- The calculator operates immediately when
=is pressed.