Update all new Tasks
This commit is contained in:
parent
00a190b0a6
commit
91df62d461
5697 changed files with 93386 additions and 804 deletions
16
Task/Nth/AutoHotkey/nth.ahk
Normal file
16
Task/Nth/AutoHotkey/nth.ahk
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
for k, v in [[0, 25], [250, 265], [1000, 1025]] {
|
||||
while v[1] <= v[2] {
|
||||
Out .= Ordinal(v[1]) " "
|
||||
v[1]++
|
||||
}
|
||||
Out .= "`n"
|
||||
}
|
||||
MsgBox, % Out
|
||||
|
||||
Ordinal(n) {
|
||||
s2 := Mod(n, 100)
|
||||
if (s2 > 10 && s2 < 14)
|
||||
return n "th"
|
||||
s1 := Mod(n, 10)
|
||||
return n (s1 = 1 ? "st" : s1 = 2 ? "nd" : s1 = 3 ? "rd" : "th")
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue