A Recursive function call itself again and again until base case . Base case is that condition in which our recursion function terminate.
Source Code
#include<iostream> using namespace std; void recursion(int lep) { int b=6; if(lep>b) return; else{ cout<<" LEP Recursion Tutorial # : "<<lep<<endl; recursion(lep=lep+1); } } int main(){ int start =1; recursion(start); return 0; }
0 comments:
Post a Comment