Write a function/method/subroutine/... that when given an integer greater than or equal to zero returns a string of the number followed by an apostrophe then the ordinal suffix.



Example

Returns would include 1'st 2'nd 3'rd 11'th 111'th 1001'st 1012'th



Task

Use your routine to show here the output for at least the following (inclusive) ranges of integer inputs:
0..25, 250..265, 1000..1025


Note: apostrophes are now optional to allow correct apostrophe-less English.





10  ' N'th
20  LET LOLIM% = 0
30  LET HILIM% = 25
40  GOSUB 1000
50  LET LOLIM% = 250
60  LET HILIM% = 265
70  GOSUB 1000
80  LET LOLIM% = 1000
90  LET HILIM% = 1025
100 GOSUB 1000
110 END 
 
995  ' Print images 
1000 FOR I% = LOLIM% TO HILIM%
1010  LET NR% = I%
1020  GOSUB 1500
1030  LET SI$ = STR$(I%)
1040  PRINT RIGHT$(SI$, LEN(SI$) - 1); SUF$; " ";
1050 NEXT I%
1060 PRINT
1070 RETURN 

1495 ' Get suffix
1500 IF (NR% MOD 10 = 1) AND (NR% MOD 100 <> 11) THEN LET SUF$ = "st": GOTO 2000
1600 IF (NR% MOD 10 = 2) AND (NR% MOD 100 <> 12) THEN LET SUF$ = "nd": GOTO 2000
1700 IF (NR% MOD 10 = 3) AND (NR% MOD 100 <> 13) THEN LET SUF$ = "rd": GOTO 2000 
1800 LET SUF$ = "th"
2000 RETURN
 