level 4
258八戒
楼主
#include <stdio.h>
int Factorial(int x);
int main(void)
{
int a;
scanf("%d",&a);
printf("%d\n",Factorial(a));
return 0;
}
int Factorial(int x)
{
if (x == 1)
return 1;
else
{
return x * Factorial(x-1);
//ERROR return x * Factorial(--x);
//ERROR return x * Factorial(x--);
//为什么后面的两个出错啊
//原因何在啊
//望大神明细啊
![[太阳]](/static/emoticons/u592au9633.png)
}
}
2016年08月23日 09点08分
1
int Factorial(int x);
int main(void)
{
int a;
scanf("%d",&a);
printf("%d\n",Factorial(a));
return 0;
}
int Factorial(int x)
{
if (x == 1)
return 1;
else
{
return x * Factorial(x-1);
//ERROR return x * Factorial(--x);
//ERROR return x * Factorial(x--);
//为什么后面的两个出错啊
//原因何在啊
//望大神明细啊
}
}