VB題:從1到100中隨機抽取五個數,使這五個數想加得到228.如11,24,33,74,86.要求這五個數不能重複。

for i1=1 to 100for i2=i1+1 to 100for i3=i2+1 to 100for i4=i3+1 to 100for i5=i4+1 to 100if (i1+i2+i3+i4+i5)=228 then輸出end...

Top