# include <stdio.h>
int f(int n)
{
if (1==n)
return 1;
else
return f(n-1)+n; //这里修改为*号,就成为100阶乘了
}
int main()
{
printf("%d\n",f(100)); //1-100累加
return 0;
}
# include <stdio.h>
int f(int n)
{
if (1==n)
return 1;
else
return f(n-1)+n; //这里修改为*号,就成为100阶乘了
}
int main()
{
printf("%d\n",f(100)); //1-100累加
return 0;
}