Thread: Urgent help please...

  1. #1
    Registered User
    Join Date
    Oct 2005

    Urgent help please...

    I need to ask for my assignment. But i Didn't get any clue to make a solution. The question is
    how to convert int to a sentences for example the user will key in this number 12563.01 and the result will be like this 12 thousand 5 hundred 63 dolar and 1 cents only....or if the input 1253481.60 the output will be like this 1 million 2 hundred and 53 thousand 4 hundred 81 dolar and 60 cents only....please help me guys...

  2. #2
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    A board search for "thousand hundred" turned up this. Perhaps you can find a starting point.
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

  3. #3
    Captain - Lover of the C
    Join Date
    May 2005
    I can't give you the code because it's in the rules but I'll give you a few clues:
    Check to see if the number is bigger than 1 million. If it is then do this:

    int number_of_millions = number/1000000;
    number -= 1000000;
    //check for thousands then hundreds then dollar then cents
    do that for all the numbers. If you still don't get it repost and i'll give a few more tips. By the way. When's it due?
    Don't quote me on that... ...seriously

  4. #4
    Registered User
    Join Date
    Oct 2005

    Re:Urgent Help Please

    I've got it already....thanks......

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. display character size...(quite urgent..)
    By karthi in forum C Programming
    Replies: 10
    Last Post: 07-11-2007, 09:42 PM
  2. beginner plzz help urgent
    By sara101 in forum C Programming
    Replies: 11
    Last Post: 01-14-2007, 10:38 PM
  3. Linked List Need Help Urgent
    By ykchua in forum C Programming
    Replies: 5
    Last Post: 08-17-2004, 02:57 PM