自定义函数求阶乘
#include <stdio.h>#include <stdlib.h>
int jc(int a)
{
int i,b=1;
for(i=a;i>=1;i--)
b=b*i;
return b;
}
int main()
{
int n;
while(scanf("%d",&n)!=EOF);
{
int m;
m=jc(n);
printf("%d",m);
}
return 0;
}
根本不能运行
2016-02-12 21:55
。
2016-02-13 02:55
2016-02-13 07:05


并不是你想的循环


2016-02-13 10:44
谢谢亲
2016-02-13 10:45
2016-02-13 23:10