Skip to content

Add line-up#362

Merged
kotp merged 1 commit into
exercism:mainfrom
BNAndras:add-line-up
Oct 14, 2025
Merged

Add line-up#362
kotp merged 1 commit into
exercism:mainfrom
BNAndras:add-line-up

Conversation

@BNAndras

Copy link
Copy Markdown
Member

No description provided.

@BNAndras BNAndras added x:module/practice-exercise Work on Practice Exercises x:rep/large Large amount of reputation labels Oct 14, 2025
@BNAndras BNAndras requested a review from kotp October 14, 2025 05:17
elseif l:mod10 == 3 && l:mod100 != 13
return 'rd'
endif
return 'th'

@kotp kotp Oct 14, 2025

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider continuing the if statement with an else as the default. The return 'th' is otherwise an implicit else and makes it seem like it is not related to the if statement.

This is an example solution, though, so does not need to be exemplar.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 17 is the happy path for most numbers so it's aligned to the left while the if....elseifs are the special cases. Considering each branch returns, I could do away with the elseif and do if for the three special cases, but I didn't want to bother adding the additional endif lines.

@kotp kotp merged commit 5a22602 into exercism:main Oct 14, 2025
6 checks passed
@BNAndras BNAndras deleted the add-line-up branch June 5, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

x:module/practice-exercise Work on Practice Exercises x:rep/large Large amount of reputation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants