c递归程序

递归

long recursin(int);
void main()
{
int n;
long result; printf("input a integer number: \n");
scanf("%d", &n); result = recursin(n);
printf("%d! = %ld\n", n, result);
} long recursin(int n)
{
long temp_result;
if(n<)
{
printf("n<0, input error!\n");
}
else if(n == || n == )
{
temp_result = ;
}
else
{
temp_result = recursin(n-) * n;
}
return temp_result;
}
上一篇:QML从文件加载组件简单示例


下一篇:python3 练习题 day03