穷举排列组合列表(1-11,列6个,合值为18)1-11中,选6个数,可以重复,相加总数为18.我的EMAIL地址为[email protected]
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/27 19:00:49
穷举排列组合列表(1-11,列6个,合值为18)1-11中,选6个数,可以重复,相加总数为18.我的EMAIL地址为[email protected]
穷举排列组合列表(1-11,列6个,合值为18)
1-11中,选6个数,可以重复,相加总数为18.我的EMAIL地址为[email protected]
穷举排列组合列表(1-11,列6个,合值为18)1-11中,选6个数,可以重复,相加总数为18.我的EMAIL地址为[email protected]
#include
int main(void)
{
int a1,a2,a3,a4,a5,a6,sum;
for(a1=1;a1
#include
#include"stdio.h"
void main(void)
{
int a1,a2,a3,a4,a5,a6,sum;
for(a1=1;a1<=11;a1++)
for(a2=1;a2<=11;a2++)
for(a3=1;a3<=11;a3++)
for(a4=1;a...
全部展开
#include
#include"stdio.h"
void main(void)
{
int a1,a2,a3,a4,a5,a6,sum;
for(a1=1;a1<=11;a1++)
for(a2=1;a2<=11;a2++)
for(a3=1;a3<=11;a3++)
for(a4=1;a4<=11;a4++)
for(a5=1;a5<=11;a5++)
for(a6=1;a6<=11;a6++)
{
sum=a1+a2+a3+a4+a5+a6;
if(sum==18)
printf("a1=%d,a2=%d,a3=%d,a4=%d,a5=%d,a6=%d\n,",a1,a2,a3,a4,a5,a6) ;
}
}
结果为:,a1=7,a2=3,a3=2,a4=1,a5=4,a6=1
,a1=7,a2=3,a3=2,a4=2,a5=1,a6=3
,a1=7,a2=3,a3=2,a4=2,a5=2,a6=2
,a1=7,a2=3,a3=2,a4=2,a5=3,a6=1
,a1=7,a2=3,a3=2,a4=3,a5=1,a6=2
,a1=7,a2=3,a3=2,a4=3,a5=2,a6=1
,a1=7,a2=3,a3=2,a4=4,a5=1,a6=1
,a1=7,a2=3,a3=3,a4=1,a5=1,a6=3
,a1=7,a2=3,a3=3,a4=1,a5=2,a6=2
,a1=7,a2=3,a3=3,a4=1,a5=3,a6=1
,a1=7,a2=3,a3=3,a4=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