1-33数字和值分解6组数字等于50
有没有会的请指教
int a,b,c,d,e,f;
for(a=1;a < 34;a++){
for(b=1;b < 34;b++){
if(a>=b)
continue;
for(c=1;c < 34;c++){
if(b>=c)
continue;
for(d=1;d < 34;d++){
if(c>=d)
continue;
for(e=1;e < 34;e++){
if(d>=e)
continue;
for(f=1;f < 34;f++){
if(e>=f)
continue;
if((a+b+c+d+e+f) == 50){
printf("%d %d %d %d %d %d \n",a,b,c,d,e,f);
}
}
}
}
}
}
}
你倒是给个采纳呀!
老哥我真是服了你了,之前问了个和等于135的,现在有问个和等于50的。。。。。