Help on recursion 
Author Message
 Help on recursion

Hello:

    Is it possible to write a recursion program with the function of
multiply by using "int multiply(int a, int b);"?

Thanks!

--
Best Regards,
Alan Tang



Sat, 17 Sep 2005 10:14:31 GMT  
 Help on recursion

Quote:
> Hello:

>     Is it possible to write a recursion program with the function of
> multiply by using "int multiply(int a, int b);"?

  Well, that sure does sound like homework, so
  I don't want to present you a ready solution.
  Anyway, to get you startet:
  You can implement multiplication by addittion.
  In order to do 'x*y' you add 'x' to itself
  for 'y-1' times. Now, whenever you have to do
  something multiple times, you can use either
  iteration or recursion.

Quote:
> Thanks!

  Hopefully that gets you started! (Feel free to
  come back and ask more, if you need.)

Quote:
> Alan Tang

  Schobi

  P.S.: Have you found alt.comp.lang.learn.c-c++?

--

I'm Schobi at suespammers org



Sat, 17 Sep 2005 16:22:21 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. novice needs help with recursion

2. HELP WITH RECURSION!

3. Newbie needs help w/ recursion

4. Help with recursion and parameter passing

5. help - VSS Recursion Flag

6. Help with recursion and pointers building doubly linked list from a binary tree.

7. Fibonacci recursion using dynamic stacks (HELP)

8. HELP ME ON RECURSION PLEASE

9. help please; recursion

10. URGENT HELP WITH TREES and recursion

11. HELP with balancing braces program using recursion.

12. Recursion help!

 

 
Powered by phpBB® Forum Software