#include<iostream>
using namespace std;
int JieCheng(int);
int main()
{
int m,n;
int x;
cout<<"please input an number: "<<endl;
cin>>n>>m;
x=JieCheng(m)/(JieCheng(n)*JieCheng(m-n));
cout<<x<<endl;
return 0;
}
int JieCheng(int index)
{
int p=1;
for(int i=1;i<=index;i++)
{
p*=i;
}
return p;
}
14.从m个球中取出n个球的所有组合情况,布布扣,bubuko.com
原文:http://www.cnblogs.com/jixiaowu/p/3890707.html