# C Program to find the Factorial using Recursion

## Write a C Program to find the Factorial using Recursion

This page has a C program to find the factorial of a number using recursion. Recursion is a process in which a function will call the same function again and again. Factorial for a number is calculated by the products of all integers below of the number, including the number. For example: Factorial of 10 is calculated by 1*2*3*4*5*6*7*8*9*10. Factorial of 10 is indicated by 10! The below given C Program to find the Factorial using Recursion . Kindly check out the program to find the Factorial using Recursion.

### Factorial program using Recursion

#include<stdio.h>
long int Factori(int);
int main(){
long int fact;
int numbr;

printf("Enter a number: ");
scanf("%d",&numbr);
fact= Factori(numbr);
printf("Factorial of %d is: %ld",numbr,fact);
return 0;
}

long int Factori(int n){
int i;
long int factorial=1;
if(n == 1)
factorial =1;
else
factorial=n*Factori(n-1);
return(factorial);
}

Sample Output:

Enter a number:  4

Factorial of  4 is: 24

Enter a number:  6

Factorial of  6 is: 720