Thread: converting numbers to letters??

  1. #1
    Registered User
    Join Date
    Nov 2002
    Posts
    60

    Question converting numbers to letters??

    Hi everyone,
    nice to be here... :-)

    So yes, this is a homework I have to hand in, that would let the user convert a floating point number to letters. I just don't know how to start, and most important how to go about that conversion!!!!!
    So I'm off course not waiting for the codes, but just a little hint on where to start!!

    Thanks

  2. #2
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    sprintf() is your friend...
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  3. #3
    Registered User planet_abhi's Avatar
    Join Date
    Oct 2002
    Posts
    92

    Smile

    use aol() function .get the help from help file.
    AbHHinaay

  4. #4
    Registered User
    Join Date
    Aug 2001
    Posts
    202
    1) Convert your float to int
    2) Convert your int to char (HINT: chars are ints)

    starX
    www.axisoftime.com

  5. #5
    Registered User
    Join Date
    Nov 2002
    Posts
    60
    I haven't learnt aol() (what does that do?)

    What I did at first is creating an char array to store the input, after validating the input I will (somehow) convert the number into letter string. Does this make sense?

  6. #6
    Registered User
    Join Date
    Nov 2002
    Posts
    60
    Let me guess.. there's no aol function huh?
    Thank you, I certainly don't feel a bit stupid now!!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Converting _getch() inputted numbers
    By bengreenwood in forum C++ Programming
    Replies: 9
    Last Post: 07-16-2008, 10:46 PM
  2. converting numbers to letters
    By sh4k3 in forum C Programming
    Replies: 6
    Last Post: 06-10-2007, 07:15 PM
  3. converting numbers to words
    By dionys in forum C Programming
    Replies: 2
    Last Post: 05-08-2004, 09:34 AM
  4. the definition of a mathematical "average" or "mean"
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 12-03-2002, 11:15 AM
  5. How do you allocate numbers to letters?
    By face_master in forum C++ Programming
    Replies: 9
    Last Post: 11-14-2001, 06:47 AM