Tag Archives: C Program Find Factorial by Recursion

C Program Find Factorial by Recursion

C Program Find Factorial by Recursion #include<stdio.h> // prototype for user defined recursive function long factorial(int); // main function int main() { int n; long fact; printf("Enter a number to find its factorial using Recursion="); scanf("%d", &n); if (n < 0) printf("Factorial of negative integers isn't defined.\n"); else { fact = factorial(n); printf("%d! = %ld",… Read More »

Loading