| spherecraft (2) | |
|
Hi hello , Im just new to c++ and im using turbo c++ 4.5 or borland c++ 4.5 as i want to learn first the old one before the new one ( i dont know why) ______________________________________________________________________________ Now I'm Making Trouble with this Project of mine Using Recursion to find the sum of 10 numbers e.g: 1+2+3+4+5+6+7+8+9+10 = 55 i can only make iterative using looping statements. I dont know recursion please help? Thanks in advance! :) Merry Christmas and Happy New Year! :) | |
|
|
|
| devonrevenge (668) | |
| The trick to understanding recursion is that you must first understand recursion. | |
|
|
|
| spherecraft (2) | |
|
Uhm Can you Show me some codes of it? Not all just a bit so i can understand the Logic behind it? :) Thanks :) | |
|
|
|
| Volatile Pulse (1329) | ||||
| ||||
|
|
||||
| vlad from moscow (3108) | |
| In fact iteration is the same as recursion but has a condensed form.:) | |
|
|
|
| ne555 (4037) | |||
If you emulate the stack...
Now suppose that the recursive calls does execute simultaneously.* The order would be O( lg n ). * By instance the processor is a bacteria, at the recursion point it performs mitosis. Edit: changed the example | |||
|
Last edited on
|
|||