慕工程0101907
fun.c1234567extern int factorial(int n){ if (n == 1 || n == 0) return 1; else return n * factorial(n - 1);}maincontent.c1234567891011121314151617#include <stdio.h> int factorial(int); int main(){ int n, fact; printf("Please input an number:"); scanf("%d", &n); if (n <= 0) { printf("n must > 0 \n"); return 1; } printf("factorial(%d) = %d", n, factorial(n)); return 0;}