#include <stdio.h>
int factorial(int x)
{
if (x <= 1)
return 1;
else
{
x = x * factorial(x - 1);
return(x);
}
}
int main()
{
int n,m;
printf("请输入n:");
scanf_s("%d", &n);
if (n <= 0 )
printf("输入错误");
else
{
int factorial(int x);
m= factorial(n);
printf("%d", m);
}
return 0;
}