c program to convert numbers between 1 and 99999

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sandeepmshetty
    New Member
    • Feb 2008
    • 1

    c program to convert numbers between 1 and 99999

    help me to solve the following program in shortest form....

    Write a program to output any number between 1 and 99999 and output it in words.

    For example: If the number is 213 then it should output "Two hundred and thirteen"
    Last edited by sicarie; Feb 24 '08, 03:24 PM. Reason: WHY ARE YOU SCREAMING?!
  • Simonius
    New Member
    • Feb 2008
    • 47

    #2
    Please read the rules, we don't just give.
    Show us what you've attempted so far.

    Comment

    • hsn
      New Member
      • Sep 2007
      • 237

      #3
      your problem is very similer to me i did read it before in an ACM contest.
      you really have to think about it. it is not so hard and i am sure you did read it from an ACM contest

      good luck

      Comment

      • weaknessforcats
        Recognized Expert Expert
        • Mar 2007
        • 9214

        #4
        How do you know that 213 is two hundred and thirteen ???

        Maybe of you wrote on paper how you got from 213 to two hundred and thirteeen, you could just code the steps in C.

        Comment

        • hsn
          New Member
          • Sep 2007
          • 237

          #5
          i will give you some hints.
          use arrays to store the strings
          and look what is commen when you between the numbers when you transfer them to string

          Comment

          Working...