从1到33的数中任选六位数的排列。用vb编程
来源:百度知道 编辑:UC知道 时间:2024/05/06 18:26:52
大哥,双色球呢?我有,你要我发你 ,包括相连,同上期,012路等。
for i1=1 to 28 step 1
for i2=2 to 29 step 1
for i3=3 to 30 step 1
for i4=4 to 31 step 1
for i5=5 to 32 step 1
for i6=6 to 33 step 1
if i1=i2-1 and i2=i3-1 and i3=i4-1 and i4=i5-1 and i5=i6-1
loop &&六连
endif
if i1=i2-1 and i2=i3-1 and i3=i4-1 and i4=i5-1 or i2=i3-1 and i3=i4-1 and i4=i5-1and i5=i6-1
loop &&五连
endif
if i1=i2-1 and i2=i3-1 and i3=i4-1 or i2=i3-1 and i3=i4-1 and i4=i5-1 or i3=i4-1 and i4=i5-1 and i5=i6-1
loop &&四联
endif
if i1=i2-1 and i2=i3-1 and i4=i5-1 and i5=i6-1
loop &&双三联
endif
print i1,i2,i3,i4,i5,i6
next i1
next i2
next i3
next i4
next i5
next i6
Private Sub Command1_Click()
Dim RN(6) As Long
Dim i As Integer
Dim OutTxt As String
Randomize (6)