#include <stdio.h>
int Factorial(int n);
int main()
{
int n;
scanf("%d",&n);
printf("%d",Factorial(n));
return 0;
}
int Factorial(int n)
{
int result,i;
result=1;
for (i=1;i<=n;i++)
{
result=result*i;
}
return result;
}
//VC++中n小于13,Turbo C中n小于8;
函数计算N的阶乘
最新推荐文章于 2023-05-21 17:10:26 发布