int factorial(int n); int main(){ int n; printf("please enter the number:"); scanf("%d", &n); printf("the result is: %d\n", factorial(n)); return 0; } int factorial(int n){ int result; if(n != 1){ result = factorial(n-1)*n; } else result = 1; return result; }