简单
2026-02-05 15:16:01
发布于:浙江
33阅读
0回复
0点赞
递归
#include<iostream>
using namespace std;
int f(int x){
if(x==0){
return 1;
}
else{
return x*f(x-1);
}
}
int main(){
int N;
cin>>N;
cout<<f(N);
}
全部评论 1
有没有一种可能,这题只是一个简简单单的阶乘?
2026-07-25 来自 浙江
0










有帮助,赞一个