Thread: a recoursive function problem!!!

  1. #1
    Registered User
    Join Date
    Dec 2001

    Unhappy a recoursive function problem!!!

    i need to write a recoursive function that gets an integer and returns it reversed!!!
    is it possible?????
    here is my lousy try!! please help me!! its 4 my university and i cant find a way.
    thanks in advance.

    int revnum(int num)
    if (num/10==0)
    return num%10;
    return 10*(num%10)+revnum(num/10,dbl);

  2. #2
    Registered User
    Join Date
    Dec 2001

    reply to the question

    its quite easy!!!
    just add the following line......

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. wxWidgets link problem
    By cboard_member in forum C++ Programming
    Replies: 2
    Last Post: 02-11-2006, 02:36 PM
  2. Including lib in a lib
    By bibiteinfo in forum C++ Programming
    Replies: 0
    Last Post: 02-07-2006, 02:28 PM
  3. Replies: 5
    Last Post: 02-08-2003, 07:42 PM
  4. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 05:06 PM
  5. qt help
    By Unregistered in forum Linux Programming
    Replies: 1
    Last Post: 04-20-2002, 09:51 AM