Spelling Numbers in Words

Can you write a function which spells out whole numbers as words? For example, 108 becomes "One hundred and eight".

For the sake of the puzzle you should make sure that your solution handles the following

Examples:

      SpellNumber 0
Zero
      SpellNumber ¯8
Minus eight
      Spell Number 10001
Ten thousand and one
      Spell Number 1234567890
One billion, two hundred and thirty-four million, five hundred and sixty-seven thousand, eight hundred and ninety

>> The Solution

   

Author: SimonMarsden


CategoryPuzzles

SpellNumbers/Task (last edited 2010-03-26 15:32:21 by SimonMarsden)