Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
15
Task/Nth/Ring/nth.ring
Normal file
15
Task/Nth/Ring/nth.ring
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
for nr = 0 to 25
|
||||
see Nth(nr) + Nth(nr + 250) + Nth(nr + 1000) + nl
|
||||
next
|
||||
|
||||
func getSuffix n
|
||||
lastTwo = n % 100
|
||||
lastOne = n % 10
|
||||
if lastTwo > 3 and lastTwo < 21 "th" ok
|
||||
if lastOne = 1 return "st" ok
|
||||
if lastOne = 2 return "nd" ok
|
||||
if lastOne = 3 return "rd" ok
|
||||
return "th"
|
||||
|
||||
func Nth n
|
||||
return "" + n + "'" + getSuffix(n) + " "
|
||||
Loading…
Add table
Add a link
Reference in a new issue