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.




def ordinalAbbrev(n)
        if int(n % 100 / 10) = 1
                return "th"
        end
 
        if n % 10 = 1
                return "st"
        else if n % 10 = 2
                return "nd"
        else if n % 10 = 3
                return "rd"
        else
                return "th"
        end
end
 
for i in range(0, 25)
        print (i + "'" + ordinalAbbrev(i) + " ")
end
println
 
for i in range(250, 265)
        print (i + "'" + ordinalAbbrev(i) + " ")
end
println
 
for i in range(1000, 1025)
        print (i + "'" + ordinalAbbrev(i) + " ")
end
println