#include <iostream>
using namespace std;
int fac(int);
int main()
{
int a,b,c;
cout<<"please enter a,b,c";
cin>>a>>b>>c;
cout<<"a!="<<fac(a)<<","<<"b!="<<fac(b)<<","<<"c!="<<fac(c)<<endl;
system("pause");
return 0;
}
int fac(int x)
{
int y;
if (x<0)
{
cout<<"error!"<<endl;
y=-1;
}
else if(x==0 || x==1)y=1;
else y=fac(x-1)*x;
return y;
}