vb 数组如何提取
Dima(1To10)AsIntegerFori=1To10a(i)=Int(Rnd*100)+1Combo1.AddItema(i)NextiEndSubPrivate...
Dim a(1 To 10) As Integer
For i = 1 To 10
a(i) = Int(Rnd * 100) + 1
Combo1.AddItem a(i)
Next i
End Sub
Private Sub Command2_Click()
Dim a(1 To 11)
For m = 1 To 10
For n = 1 To 10 - m
If a(m) > a(n) Then
t = a(m)
a(m) = a(n)
a(n) = t
End If
Next n
Next m
For a(m) = 1 To 10
List1.AddItem a(m)
Next a(m)
End Sub
我想在Command2里用前面的那组数据
要怎么样做呢 展开
For i = 1 To 10
a(i) = Int(Rnd * 100) + 1
Combo1.AddItem a(i)
Next i
End Sub
Private Sub Command2_Click()
Dim a(1 To 11)
For m = 1 To 10
For n = 1 To 10 - m
If a(m) > a(n) Then
t = a(m)
a(m) = a(n)
a(n) = t
End If
Next n
Next m
For a(m) = 1 To 10
List1.AddItem a(m)
Next a(m)
End Sub
我想在Command2里用前面的那组数据
要怎么样做呢 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询