[求助] 求阶乘的函数为什么结果总是零
#include<stdio.h>#include<math.h>
float fac(int k)
{int t=1,i;
for(i=2;i<=k;i++)
t*=i;
return t;
}
main()
{ int m,n;
float c;
printf("Input m,n:");
scanf("%d,%d",&m,&n);
c=fac(m)/(fac(n)*fac(m-n));
printf("m!=%d n!=%d cmn zhi wei:%f\n",fac(m),fac(n),c);
getch();
return 0;
}