How to approach to the following program

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • santechselva
    New Member
    • May 2010
    • 8

    How to approach to the following program

    How to give output in words for the input given in numbers?
    For example:
    1234
    one thousand two hundred and thirty four
  • whodgson
    Contributor
    • Jan 2007
    • 542

    #2
    Start by writing your program so that it simply substitutes "one" for 1 and "two" for 2 so that in your case it will output one two three four. Then improve the code to produce "thirty four" instead of "three four". You will need to take care of "eleven" to "nineteen" with the tens and ones digits and then extend this out for use with "fourteen" billion, million, thousand and hundred.
    hth`s

    Comment

    • donbock
      Recognized Expert Top Contributor
      • Mar 2008
      • 2427

      #3
      Look here.

      Comment

      Working...