1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

help please for pro in c++

Discussion in 'C++' started by arunlalds, Mar 24, 2010.

  1. arunlalds

    arunlalds Banned

    Joined:
    Mar 12, 2010
    Messages:
    43
    Likes Received:
    2
    Trophy Points:
    0
    Occupation:
    student
    Location:
    India
    write a c++ program to read 3 digit no and print out it in words
    eg:
    455 = four hundred and fifty five
    101= one hundred and one
    612= six hundred and twelve

    use pointer for this purposes
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,283
    Likes Received:
    364
    Trophy Points:
    83
    This should not be very difficult and what have you thought of as a logic
     
  3. virxen

    virxen New Member

    Joined:
    Nov 24, 2009
    Messages:
    387
    Likes Received:
    90
    Trophy Points:
    0
    -start with reading the number in a variable
    -validate the number entered
    -create an array like char [10][3][30]
    0-9>| 0 | 1 | 2|
    -------------------------
    and fill it with the correct values for example 5> | five | fifty |five|

    do this and post your code to continue.
     

Share This Page