#include long fact(int n);int main() { int n; long L; for(n = 2;n < 10;n++) { L = fact(n); printf("%d! = %ld\n",n,L); } return 0;}long fact(int n) { if(n == 1 || n == 0) return 1; return n*fact(n - 1);}
有printf输出的信息么、发上来看看、看代码没什么问题啊。