递归
#include<iostream>
using namespace std;
long fac(int n);
int main () {
int n;
cout<<"Input n:";
cin>>n ;
cout<<fac(n)<<endl;
return 0;
}
long fac(int n)
{if(n==1)
return n;
else
return (2*n-1)*fac(n-1);
}
using namespace std;
long fac(int n);
int main () {
int n;
cout<<"Input n:";
cin>>n ;
cout<<fac(n)<<endl;
return 0;
}
long fac(int n)
{if(n==1)
return n;
else
return (2*n-1)*fac(n-1);
}