N'th: Difference between revisions
Content added Content deleted
(Add Seed7 example) |
(→{{Header|PARI/GP}}: I don't know what to tell you -- I paste it in and it works as designed. Here's an example.) |
||
Line 741: | Line 741: | ||
=={{Header|PARI/GP}}== |
=={{Header|PARI/GP}}== |
||
{{incomplete|PARI/GP|"High number teens" (such as 111th, 1012th, etc) are not accounted for and output incorrectly.}} |
|||
(Spurious apostrophes intentionally omitted, following Perl 6.) |
(Spurious apostrophes intentionally omitted, following Perl 6.) |
||
Line 748: | Line 747: | ||
apply(ordinal, [250..265]) |
apply(ordinal, [250..265]) |
||
apply(ordinal, [1000..1025]) |
apply(ordinal, [1000..1025]) |
||
</lang> |
apply(ordinal, [111, 1012])</lang> |
||
{{out}} |
{{out}} |
||
<pre>%1 = ["0th", "1st", "2nd", "3rd", "4th", "5th", "6th", "7th", "8th", "9th", "10th", "11th", "12th", "13th", "14th", "15th", "16th", "17th", "18th", "19th", "20th", "21st", "22nd", "23rd", "24th", "25th"] |
<pre>%1 = ["0th", "1st", "2nd", "3rd", "4th", "5th", "6th", "7th", "8th", "9th", "10th", "11th", "12th", "13th", "14th", "15th", "16th", "17th", "18th", "19th", "20th", "21st", "22nd", "23rd", "24th", "25th"] |
||
%2 = ["250th", "251st", "252nd", "253rd", "254th", "255th", "256th", "257th", "258th", "259th", "260th", "261st", "262nd", "263rd", "264th", "265th"] |
%2 = ["250th", "251st", "252nd", "253rd", "254th", "255th", "256th", "257th", "258th", "259th", "260th", "261st", "262nd", "263rd", "264th", "265th"] |
||
%3 = ["1000th", "1001st", "1002nd", "1003rd", "1004th", "1005th", "1006th", "1007th", "1008th", "1009th", "1010th", "1011st", "1012nd", "1013rd", "1014th", "1015th", "1016th", "1017th", "1018th", "1019th", "1020th", "1021st", "1022nd", "1023rd", "1024th", "1025th"] |
%3 = ["1000th", "1001st", "1002nd", "1003rd", "1004th", "1005th", "1006th", "1007th", "1008th", "1009th", "1010th", "1011st", "1012nd", "1013rd", "1014th", "1015th", "1016th", "1017th", "1018th", "1019th", "1020th", "1021st", "1022nd", "1023rd", "1024th", "1025th"] |
||
%4 = ["111th", "1012th"]</pre> |
|||
=={{Header|Perl}}== |
=={{Header|Perl}}== |