Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
25
Task/Nth/Maple/nth.maple
Normal file
25
Task/Nth/Maple/nth.maple
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
toOrdinal := proc(n:: nonnegint)
|
||||
if 1 <= n and n <= 10 then
|
||||
if n >= 4 then
|
||||
printf("%ath", n);
|
||||
elif n = 3 then
|
||||
printf("%ard", n);
|
||||
elif n = 2 then
|
||||
printf("%and", n);
|
||||
else
|
||||
printf("%ast", n);
|
||||
end if:
|
||||
else
|
||||
printf(convert(n, 'ordinal'));
|
||||
end if:
|
||||
return NULL;
|
||||
end proc:
|
||||
|
||||
a := [[0, 25], [250, 265], [1000, 1025]]:
|
||||
for i in a do
|
||||
for j from i[1] to i[2] do
|
||||
toOrdinal(j);
|
||||
printf(" ");
|
||||
end do;
|
||||
printf("\n\n");
|
||||
end do;
|
||||
Loading…
Add table
Add a link
Reference in a new issue