#include<iostream>
using namespace std;
int Cmn(int m,int n){//计算C(m,n) ,即从m个数中取出n个数的组合数
if(m < 0 || n < 0 || m < n) return 0;//边界条件
if(n == m) return 1;
if(n == 1) return m;
return Cmn(m-1,n) + Cmn(m-1,n-1);
}
int main(){
cout<<"C(6,0)="<<Cmn(6,0)<<endl;
cout<<"C(6,1)="<<Cmn(6,1)<<endl;
cout<<"C(6,2)="<<Cmn(6,2)<<endl;
cout<<"C(6,6)="<<Cmn(6,1)<<endl;
return 0;
}