Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
19
Task/Nth/PureBasic/nth.basic
Normal file
19
Task/Nth/PureBasic/nth.basic
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
Procedure.s Suffix(n.i)
|
||||
Select n%10
|
||||
Case 1 : If n%100<>11 : ProcedureReturn "st" : EndIf
|
||||
Case 2 : If n%100<>12 : ProcedureReturn "nd" : EndIf
|
||||
Case 3 : If n%100<>13 : ProcedureReturn "rd" : EndIf
|
||||
EndSelect
|
||||
ProcedureReturn "th"
|
||||
EndProcedure
|
||||
|
||||
Procedure put(a.i,b.i)
|
||||
For i=a To b : Print(Str(i)+Suffix(i)+" ") : Next
|
||||
PrintN("")
|
||||
EndProcedure
|
||||
|
||||
If OpenConsole()=0 : End 1 : EndIf
|
||||
put(0,25)
|
||||
put(250,265)
|
||||
put(1000,1025)
|
||||
Input()
|
||||
Loading…
Add table
Add a link
Reference in a new issue