Skip to content

Conversation

@tanvikreddy123
Copy link

This commit addresses an off-by-one error in the loop condition within 18-affirmations.java.
The original loop used i <= 50, resulting in 51 iterations due to zero-based indexing (i starting at 0).
By updating the condition to i < 50, the loop executes exactly 50 times, aligning with the intended behavior of printing the affirmation fifty times.

This correction enhances the accuracy of the program and ensures compliance with the exercise requirements.

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