• 2021-04-14
    中国大学MOOC:编程计算下面组合数的值【图片】代码如下,按要求在空白处填写适当的表达式或语句,使程序完整并符合题目要求。#include_________________________;intmain(){intm,k;_________;do{printf("Pleaseinputm,k(m>=k>0):");scanf("%d,%d",&m,&k);}while(______________);p=(double)Factorial(m)/(Factorial(k)*Factorial(m-k));printf("p=%.0f\n",p);return0;}//函数功能:计算无符号整型数number的阶乘unsignedlongFactorial(unsignedintnumber){unsignedlongi,result=1;for(________________){result*=i;}returnresult;}
  • 举一反三