Data update
This commit is contained in:
parent
29a5eea0d4
commit
5c1bb7bfa9
2011 changed files with 35081 additions and 3229 deletions
9
Task/Nth/PascalABC.NET/nth.pas
Normal file
9
Task/Nth/PascalABC.NET/nth.pas
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
var suffix := |'th', 'st', 'nd', 'rd'| + |'th'| * 6;
|
||||
|
||||
function Nth(n: integer)
|
||||
:= $'{n}''' + if n mod 100 not in 11..19 then suffix[n mod 10] else 'th';
|
||||
|
||||
begin
|
||||
((0..24) + (500..524) + (700..724) + (1000..1024))
|
||||
.Select(Nth).Println;
|
||||
end.
|
||||
Loading…
Add table
Add a link
Reference in a new issue