Calculator Doesn't Display Negative Result
- Dominant language
- HTML
- Stars
- 0
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
**When performing subtraction operations that result in a negative number, such as 5 - 20, the calculator fails to display the minus sign in front of the result. For example, instead of showing -15, the calculator shows only 15. This issue affects all subtraction operations where the result is negative.**
Steps to Reproduce:
Open the calculator.
Input any subtraction operation where the result is negative (e.g., 5 - 20).
Press the equal button (=).
Observe the displayed result.
Expected Result:
The calculator should display the correct result, including the minus sign, for negative numbers (e.g., -15).
Actual Result:
The minus sign is missing, and the result is displayed as a positive number (e.g., 15).
Suggested Solution:
Investigate the logic responsible for rendering the result of subtraction operations.
Ensure that the minus sign is correctly attached to results that are less than zero.
Test all basic arithmetic operations (addition, subtraction, multiplication, division) to confirm that only the subtraction operation is affected by this issue.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.