实现阶乘函数:
double fact(int n){
if (n==o){
return 1;
}
else{
double f=1,i;
for(i=1;i<=n;i++){
f*=i;
}
return f;
}
}
double fact(int n) {
if (n == 0) return 1;
else return n * fact(n - 1);
}
07-25
1782
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
03-05
64
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)