Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
14
Task/Nth/Zkl/nth-1.zkl
Normal file
14
Task/Nth/Zkl/nth-1.zkl
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#if 0
|
||||
fcn addSuffix(n){
|
||||
z:=n.abs()%100;
|
||||
if(11<=z<=13) return(String(n,"th"));
|
||||
z=z%10;
|
||||
String(n,(z==1 and "st") or (z==2 and "nd") or (z==3 and "rd") or "th");
|
||||
}
|
||||
#else
|
||||
fcn addSuffix(n){
|
||||
var suffixes=T("th","st","nd","rd","th","th","th","th","th","th"); //0..10
|
||||
z:=n.abs()%100;
|
||||
String(n,(z<=10 or z>20) and suffixes[z%10] or "th");
|
||||
}
|
||||
#endif
|
||||
3
Task/Nth/Zkl/nth-2.zkl
Normal file
3
Task/Nth/Zkl/nth-2.zkl
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[0..25] .apply(addSuffix).concat(",").println();
|
||||
[250..265] .apply(addSuffix).concat(",").println();
|
||||
[1000..1025].apply(addSuffix).concat(",").println();
|
||||
Loading…
Add table
Add a link
Reference in a new issue