Skip to content

Conversation

MakaremHind
Copy link

Description:

This pull request adds important input validation checks to improve the robustness and user experience of the calculator application. The following enhancements were implemented:

  • Prevent Multiple Decimal Points:

    Prevents users from entering multiple decimal points within a single number, which could lead to invalid inputs or parsing errors.

  • Prevent Consecutive Operators:

    Prevents users from adding two operators consecutively.

  • Division by Zero Check:

    Adds validation to handle division by zero, displaying an error message when a user attempts to divide by zero.

The code is now more resilient to unexpected user inputs, providing a smoother and more reliable user experience.

@thinkswell thinkswell closed this Aug 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants