Recursion Function C Programming Home » C Functions » Recursion Function /*Recursion Function*/ #include #include void main() { int n,r; int fact(int n); printf("Recursion: In programming terms, \na recursive function can be defined as a routine that calls itself directly or indirectly."); printf("\n\nEnter the No."); scanf("%d",&n); r = fact(n); printf("%d",r); getch(); } int fact(int n) { int f; if(n==1) return (1); else f = n * fact (n-1); return(f); } Output : Tweet Share Share Share Share Related Post
ConversionConversion EmoticonEmoticon