/* EXPERIMENT - */ /* AIM : TO FIND THE FACTORIAL OF A GIVEN NUMBER USING RECURSIVE FUNCTION */ /* PROGRAMMER : SHEKHAR A. SHERIKAR */ /* COMPUTER TECHNOLOGY - CM102 (B3) */ main() { int a,b,ans; clrscr(); printf("\n\n\n"); printf("\n\n\t\tThis program will help you to evaluate the factorial of "); printf("\n\t\t an entered integer number. "); printf("\n\n\t\t Enter the number for factorial evaluation : "); scanf("%d",&a); b=1; ans=fact(a,b); printf("\n\n\t\t The factorial value of the entered number is : %d",ans); getch(); } fact(int a,int b) { b=a*b; a=a-1; if(a>=1) fact(a,b); else return(b); }