Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
11
Task/Nth/Icon/nth.icon
Normal file
11
Task/Nth/Icon/nth.icon
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
procedure main(A)
|
||||
every writes(" ",nth(0 to 25) | "\n")
|
||||
every writes(" ",nth(250 to 265) | "\n")
|
||||
every writes(" ",nth(1000 to 1025) | "\n")
|
||||
end
|
||||
|
||||
procedure nth(n)
|
||||
return n || ((n%10 = 1, n%100 ~= 11, "st") |
|
||||
(n%10 = 2, n%100 ~= 12, "nd") |
|
||||
(n%10 = 3, n%100 ~= 13, "rd") | "th")
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue