/求组合数;根据公式可以算出cmn/
#include<stdio.h>
double fact(int n);
int main()
{int m,n,i;
double c;
printf("Enter m:");
scanf("%d",&m);
printf("Enter n:");
scanf("%d",&n);
c=fact(n)/(fact(m)fact(n-m));
printf("c=%.0f\n",c);
return 0;
}
double fact(int n)
{int i;
double product;
product=1;
for(i=1;i<=n;i++)
{product=producti;
}
return product;
}

求学霸帮我看看为啥结果一直是0呀
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-