- C++
阶乘
- @ 2025-7-8 13:40:30
#include<bits/stdc++.h> using namespace std;
int num;
int f(int n){ if (n>1){ return n*f(n-1); } if (n==1){ return 1; } }
int main(){ cin>>num; cout<<f(num); return 0; }
0 comments
No comments so far...
By signing up a YZOJ universal account, you can submit code and join discussions in all online judging services provided by us.