Thread: Problem with recursion

  1. #1
    Registered User
    Join Date
    Oct 2011
    Posts
    2

    Problem with recursion

    Calculate the value of X using recursion

    X=(p*q)/1!+ (p-1*q-1)/2!+ (p-2*q-2)/3! + (p-3*q-3)/4! +
    (p-4*q-4)/5!


    'p' and 'q' are the user inputs.

    Today,I got this question in my test paper.
    just wondering how it would have been implemented.
    Last edited by Modest Mouse; 10-10-2011 at 10:38 AM.

  2. #2
    Registered User
    Join Date
    Nov 2010
    Location
    Long Beach, CA
    Posts
    5,909
    Read our homework policy. Then, read the forum guidelines, and post your effort in code tags. I'm not really sure how much help you'll get though, considering this is for your test. It is fairly simple, however, and can be implemented in very few lines of code. Maybe you should read some tutorials on recursion.

  3. #3
    Registered User
    Join Date
    Oct 2011
    Posts
    2
    thanks 4 d reply.will surely check the link.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Recursion problem
    By chaklader in forum C Programming
    Replies: 6
    Last Post: 05-28-2010, 09:34 PM
  2. Recursion problem
    By mag_chan in forum C Programming
    Replies: 3
    Last Post: 11-25-2005, 03:57 AM
  3. Recursion problem
    By Lost__Soul in forum C Programming
    Replies: 7
    Last Post: 04-19-2003, 04:55 PM
  4. recursion problem!!
    By newbie_grg in forum C++ Programming
    Replies: 5
    Last Post: 07-30-2002, 01:37 PM
  5. Recursion Problem
    By Unregistered in forum C++ Programming
    Replies: 0
    Last Post: 04-25-2002, 06:59 PM