N'th: Difference between revisions
Content added Content deleted
(→{{header|UNIX Shell}}: simplify with ternary op) |
Drkameleon (talk | contribs) |
||
Line 449: | Line 449: | ||
if? or? 100 >= n%100 |
if? or? 100 >= n%100 |
||
20 < n%100 |
20 < n%100 |
||
-> (to :string n) ++ "'" ++ suffixes |
-> (to :string n) ++ "'" ++ suffixes\[n%10] |
||
else -> (to :string n) ++ "'th" |
else -> (to :string n) ++ "'th" |
||
] |
] |