Recursion means calling a function by himself again and again until base case. In this simple Program we use recursion in recursive function. In main class just initialize a variable and then pass through the Parameter of function. In function we can decrements the value of that variable by using the recursive call function. And when the value of first initialization is equal to the condition then Program terminates.
- Blogger Comment
- Facebook Comment
Subscribe to:
Post Comments
(
Atom
)
0 comments:
Post a Comment