摘要:
/*求组合数:求n个数(1....n)中k个数的组合....如:combination(5,3)要求输出:543,542,541,532,531,521,432,431,421,321,*/#include#includeintpop(int*);intpush(int);voidcombination(int,int);intstack[3]={0};inttop=-1;intmain(){intn,m;n=5;m=3;combination(n,m);printf("\n");}voidcombination(intm,intn){inttemp=m;push(temp 阅读全文