这个代码可以做出双色球选号程序,但是请问一下这个程序代码的思路是什么?
Private Sub Command1_Click()
Dim a(5) As Integer, t As Integer
Dim i As Integer, j As Integer
a(0) = Int(Rnd * 33) + 1
For i = 1 To 5
L1: t = Int(Rnd * 33) + 1
For j = 0 To i - 1
If a(j) = t Then
GoTo L1
Exit For
End If
Next j
a(i) = t
Next i
For i = 0 To 4
For j = i + 1 To 5
If a(i) > a(j) Then
t = a(i)
a(i) = a(j)
a(j) = t
End If
Next j
Next i
Text1.Text = a(0)
Text2.Text = a(1)
Text3.Text = a(2)
Text4.Text = a(3)
Text5.Text = a(4)
Text6.Text = a(5)
Text7.Text = Int(Rnd * 16) + 1
End Sub
开始一段 生成 6个 1 到 33 之间的不相同的随机数值;
后面一段 按照从小到大排列, 再生成一个 1 到 16之间的随机数值;
22062期双色中奖号码是多少