Currentlyĭeals with anything from 0 to 999 999 999. # returns a string representation of n in words. Works with: ELLA ALGOL 68 version Any (with appropriate job cards) - tested with release 1.8.8d.fc9.i386 PROC number words = ( INT n ) STRING : ( 123456789987654321 negative one hundred and twenty-three billiard, four hundred and fifty-six billion, seven hundred and eighty-nine milliard, nine hundred and eighty-seven million, six hundred and fifty-four thousand, three hundred and twenty-one 77000112609 negative seventy-seven milliard, one hundred and twelve thousand, six hundred and nine 1501 negative one thousand, five hundred and one The solution is recursive by the triplets of decimal numbers.ġ2609 twelve thousand, six hundred and nineĥ12609 five hundred and twelve thousand, six hundred and nineĤ3112609 forty-three million, one hundred and twelve thousand, six hundred and nineħ7000112609 seventy-seven milliard, one hundred and twelve thousand, six hundred and nineĩ99999999999999999 nine hundred and ninety-nine billiard, nine hundred and ninety-nine billion, nine hundred and ninety-nine milliard, nine hundred and ninety-nine million, nine hundred and ninety-nine thousand, nine hundred and ninety-nine Samples: constant array (Natural range ) of Spellable 999_999_999_999_999_999 įunction Spell (N : Spellable ) return String isįunction Twenty (N : Spellable ) return String isįunction Decade (N : Spellable ) return String isįunction Hundred (N : Spellable ) return String isĪda. G DC F'0',F'2',F'19',F'20',F'21',F'99',F'100',F'101',F'-123'ĭC F'9123',F'467889',F'1234567',F'2147483647'ĩ123 nine thousand one hundred twenty-threeĤ67889 four hundred sixty-seven thousand eight hundred eighty-nineġ234567 one million two hundred thirty-four thousand five hundred sixty-sevenĢ147483647 two billion one hundred forty-seven million four hundred eighty-three thousand six hundred forty-seven V DC CL50'thousand million billion trillion' T DC CL50'ten eleven twelve thirteen fourteen'ĭC CL50'fifteen sixteen seventeen eighteen nineteen'ĭC CL50'fifty sixty seventy eighty ninety' Translation of: AppleSoft Basic * Number names ĭO WHILE=(C,R6,LE,=A(NG)) do i=1 to hbound(g)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |