新人求助!C++
递归函数求阶乘‘’输出时多输出了第三行空格
怎么去掉第三行
程序代码:#include<iostream>
using namespace std;
int t;
int fac(int);
int main()
{
int x;
cin>>x;
fac(x);
cout<<t<<endl;
return 0;
}
int fac(int x)
{
if(x==1)
t=1;
else
{
fac(x-1);
t*=x;
}
}

