程序代码:
#include <iostream>
using namespace std;
int fact(int n)
{
int temp=1;
for(int i=1;i<=n;i++)
temp*=i;
return temp;
}
int main()
{
int m,n;
cout<<"Enter m:";
cin>>m;
cout<<"Enter n:";
cin>>n;
double s;
s=fact(n)/(fact(m)*fact(n-m));
cout<<"result ="<<s<<endl;
}
加油哦











,总之还是要谢谢大家的帮忙,希望可以交个朋友,以后多多帮助了,谢谢