Spelling of ordinal numbers: Difference between revisions
Content added Content deleted
(Added Sidef) |
|||
Line 856: | Line 856: | ||
</pre> |
</pre> |
||
The '''$SPELL#.REX''' routine can be found here ───► [[$SPELL.REX|$SPELL#.REX]]. <br><br> |
The '''$SPELL#.REX''' routine can be found here ───► [[$SPELL.REX|$SPELL#.REX]]. <br><br> |
||
=={{header|Sidef}}== |
|||
<lang ruby>var lingua_en = frequire('Lingua::EN::Numbers') |
|||
var tests = [1,2,3,4,5,11,65,100,101,272,23456,8007006005004003] |
|||
tests.each {|n| |
|||
printf("%16s : %s\n", n, lingua_en.num2en_ordinal(n)) |
|||
}</lang> |
|||
{{out}} |
|||
<pre> |
|||
1 : first |
|||
2 : second |
|||
3 : third |
|||
4 : fourth |
|||
5 : fifth |
|||
11 : eleventh |
|||
65 : sixty-fifth |
|||
100 : one hundredth |
|||
101 : one hundred and first |
|||
272 : two hundred and seventy-second |
|||
23456 : twenty-three thousand four hundred and fifty-sixth |
|||
8007006005004003 : eight quadrillion, seven trillion, six billion, five million, four thousand and third |
|||
</pre> |
|||
=={{header|VBA}}== |
=={{header|VBA}}== |