Recursion

Process of a function that calls itself.

 

Must have an ending point, or it will go into an infinite loop.

 

Compile & run:

Recursion: 5
Recursion: 4
Recursion: 3
Recursion: 2
Recursion: 1
Factorial 5! = 120

Leave a Reply