/* Program to find out the factorial of a given number using fn subprogram */ /* Problem 25 */ #include #include int fact(int n) { if (n == 1) return 1; else return (n * fact(n-1)); } main() { int n; clrscr(); printf("Enter the number : "); scanf("%d",&n); printf("\nThe factorial of the number, i.e. %d! = %d",n,fact(n)); printf("\n\nPress any key to exit..."); getch(); }