这样子写程序就可以了,vc6下验证成功#includevoid main(){ long int sum=0; long int count(int n); int n; printf("input n="); scanf("%d",&n); printf("result is %ld\n",count(n));}long int count(int n){ if(n>1) return n*count(n-1); else return 1;}