Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network/Wifi change detection Solved #62

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Shudhu7
Copy link

@Shudhu7 Shudhu7 commented Sep 20, 2024

Addressing issue #61 ,

1.Corrected Loop Condition: Changed the loop condition from i <= 2 to i <= num to ensure the loop executes the correct number of times to calculate the factorial.

2.Edge Case Handling: Added a check to throw an IllegalArgumentException if the input number is negative, since factorials are not defined for negative numbers.

3..Improved Output Formatting: Added a space after the colon in the output message for better readability.

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.

1 participant