/* LightCollege.ir Learc C Programing*/
/* Factorial Example */
#include<stdio.h>

long factorial(long n);
void main(){
	long x;
	printf("Enter Number : ");
	scanf("%ld",&x);
	long result = factorial(x);
	printf("%ld",result);
}

long factorial(long n){
	if(n==0)return 0;
	if(n==1)return 1;
	return n * factorial(n-1);
}
/*power by LightCompany.ir*/
