#include<stdio.h>
#include<stdlib.h>
int fib(int n)
{
if (n <= 1)
return 1;
else
return n * fib(n - 1);
}
int main()
{
int n = 0;
scanf("%d", &n);
printf("%d\n", fib(n));
system("pause");
return 0;
}
【C语言】利用递归方法求 n!
猜你喜欢
转载自blog.csdn.net/ZD_012/article/details/104712949
今日推荐
周排行