用VB 6.0怎么编写1-33个数字中,求和为110的数组啊?

来源:百度知道 编辑:UC知道 时间:2024/04/30 04:31:06
用其中的6个数 33个数字中数字不能相同= =# 麻烦再详细些。最好的情况是给我上张截图。或者能让我复制粘贴就能用的。= =#

for a= 1 to 33
for b=1 to 33
....
for f=1 to 33
if a<b and b<c and c<d and d<e and e<f then
if a+b+c+d+e+f=110 then
debug.print a,b,c,d,e,f
end if
end if
next
....
next
next

省略号的自己补充 要将结果存数组也自己补充代码
因为是穷举法 数量又多 所以有假死状态 自行加 DoEvents 语句就会好点