Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 131,732 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 2,210 people online right now. Registration is fast and FREE... Join Now!




Help explain recursion and how it works

 
Reply to this topicStart new topic

Help explain recursion and how it works

Wilbur
post 27 Sep, 2008 - 07:41 AM
Post #1


New D.I.C Head

*
Joined: 26 Sep, 2008
Posts: 17

Hey guys! I am being required to write a recursive function to compute the Ackermann function when given two numbers. Recursion is a new topic to me and I understand that it is a function that keeps calling itself and breaks the problem into smaller problems, but I really just don't understand this problem at all. I understand that my function needs to receive to integer arguments, but other than that I am lost. I am not asking someone to do my homework for me, but all I want is just a gentle push to help me along.

Thanks for your time!

Wilbur.
User is offlineProfile CardPM

Go to the top of the page

Wilbur
post 27 Sep, 2008 - 07:41 AM
Post #2


New D.I.C Head

*
Joined: 26 Sep, 2008
Posts: 17

Hey guys! I am being required to write a recursive function to compute the Ackermann function when given two numbers. Recursion is a new topic to me and I understand that it is a function that keeps calling itself and breaks the problem into smaller problems, but I really just don't understand this problem at all. I understand that my function needs to receive to integer arguments, but other than that I am lost. I am not asking someone to do my homework for me, but all I want is just a gentle push to help me along.

Thanks for your time!

Wilbur.
User is offlineProfile CardPM

Go to the top of the page

PsychoCoder
post 27 Sep, 2008 - 07:49 AM
Post #3


using DIC.Core;

Group Icon
Joined: 26 Jul, 2007
Posts: 8,909



Thanked 116 times

Dream Kudos: 8450

Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions


Duplicate post, topics merged smile.gif
User is offlineProfile CardPM

Go to the top of the page

OliveOyl3471
post 27 Sep, 2008 - 08:16 AM
Post #4


It's all about the code ♥

Group Icon
Joined: 11 Jul, 2007
Posts: 1,460



Thanked 14 times

Dream Kudos: 100
My Contributions


Hello there Wilbur.
I asked a similar question recently, and it was answered quite well, here. Just do a search for "Recursion?"
biggrin.gif
User is offlineProfile CardPM

Go to the top of the page

Reply to this topicStart new topic
Time is now: 11/20/08 10:39AM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month