c语言自定义函数 c语言自定义函数,1到10的阶乘。怎么写啊?
c语言自定义函数,1到10的阶乘。怎么写啊?#include “stdio.h”int jiecheng(int n){if(n==1)return 1else return n*jiecheng(n
c语言自定义函数,1到10的阶乘。怎么写啊?
#include “stdio.h”
int jiecheng(int n)
{
if(n==1)
return 1
else return n*jiecheng(n-1)
}
int main()
{
printf(“10阶乘d”,jiecheng(10))
return 0
}