#include <iostream>
using namespace std;
int explore_method(int n)
{
if(n>1)
return n*explore_method(n-1);
else
return 1;
}
int main()
{
int n;
cin>>n;
cout<<explore_method(n);
return 0;
}
c++ 递归求n的阶乘
最新推荐文章于 2025-03-29 10:47:59 发布