递归求N!
#include <iostream>
using namespace std;
int fac(int i)
{
int n,val;
for(n=i;n>1;n--)
val*=n;
return val;
}
int main()
int i;
cout<<"请输入整数i=";
cin>>i;
f=fac(i);
cout<<"i!="<<f<<endl;
reurn 0;