Results 1 to 8 of 8
  1. #1
    manideep.d132 is offline Member
    Join Date
    Aug 2011
    Posts
    10
    Rep Power
    0

    Default Need a Help to write a program like write a word for the given number

    You are given a number of any length and you need to display it in words.
    Exapmle : 123456 : One lack Twenty three thousand four hundred and fifty six. For more details Conditions
    Last edited by DarrylBurke; 01-23-2012 at 08:32 PM.

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,864
    Rep Power
    8

    Default Re: Need a Help to write a program like write a word for the given number

    That is absolutely not how this works. This isn't a homework service, and asking other people to do your work for you is extremely rude. If you actually want help, please read the link in my signature on asking questions the smart way.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    PhQ's Avatar
    PhQ
    PhQ is offline Senior Member
    Join Date
    Mar 2010
    Location
    Lithuania
    Posts
    358
    Rep Power
    5

    Default Re: Need a Help to write a program like write a word for the given number

    One hundred and twenty three thousand four hundred and fifty six.

  4. #4
    Iron Lion is offline Senior Member
    Join Date
    Nov 2010
    Posts
    210
    Rep Power
    4

    Default Re: Need a Help to write a program like write a word for the given number

    Any length? As in Graham's number factorial?

  5. #5
    Join Date
    Nov 2011
    Location
    Schijndel, Netherlands
    Posts
    12
    Rep Power
    0

    Default Re: Need a Help to write a program like write a word for the given number

    Use an hashmap.
    Fill it with numbers 1-9 and with the corresponding "string".
    Split the given number, and get the corresponding "string" from the hashmap.

    Quote Originally Posted by KevinWorkman
    This isn't a homework service, and asking other people to do your work for you is extremely rude
    agreed, anyway this should do the trick, you can do the coding yourself ;)

  6. #6
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,336
    Blog Entries
    7
    Rep Power
    20

    Default Re: Need a Help to write a program like write a word for the given number

    Quote Originally Posted by manideep.d132 View Post
    You are given a number of any length and you need to display it in words.
    Exapmle : 123456 : One lack Twenty three thousand four hundred and fifty six. For more details Conditions
    What's that 'lack' thing? I know it's something Asian (Indian?) but that's all I know ...

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  7. #7
    Iron Lion is offline Senior Member
    Join Date
    Nov 2010
    Posts
    210
    Rep Power
    4

    Default Re: Need a Help to write a program like write a word for the given number

    Presumably a misspelling of lakh.

  8. #8
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,336
    Blog Entries
    7
    Rep Power
    20

    Default Re: Need a Help to write a program like write a word for the given number

    Quote Originally Posted by Iron Lion View Post
    Presumably a misspelling of lakh.
    Interesting, I didn't know that, so (according to that Wiki page) it's a grouping of magnitudes of 100 above the lowest 1000. My DecimalFormat object can't do that ...

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. Replies: 3
    Last Post: 08-30-2011, 04:44 PM
  2. Replies: 4
    Last Post: 03-21-2011, 09:49 PM
  3. trying to write a program for hangman word game
    By durdanto in forum New To Java
    Replies: 1
    Last Post: 02-12-2011, 02:53 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •