Magnanimous numbers: Difference between revisions
Content added Content deleted
(Added Go) |
(→{{header|Go}}: Minor improvement.) |
||
Line 111: | Line 111: | ||
func ord(n int) string { |
func ord(n int) string { |
||
m := n % 100 |
m := n % 100 |
||
if m >= |
if m >= 4 && m <= 20 { |
||
return fmt.Sprintf("%dth", n) |
return fmt.Sprintf("%dth", n) |
||
} |
} |