1.1
#includeint main(void){ int n; int factorial(int n); scanf("%d",&n); printf("%d\n",factorial(n)); return 0;}int factorial(int n){ int i,fact= 1; for(i=1;i<=n;i++) fact=fact*i; return fact;}
本文共 299 字,大约阅读时间需要 1 分钟。
1.1
#includeint main(void){ int n; int factorial(int n); scanf("%d",&n); printf("%d\n",factorial(n)); return 0;}int factorial(int n){ int i,fact= 1; for(i=1;i<=n;i++) fact=fact*i; return fact;}
转载于:https://www.cnblogs.com/simple9495/p/3398773.html