Private Sub Command1_Click()
Dim team(8), teamA(4), teamB(4) As String, i%, j%
team(1) = "中国"
team(2) = "美国"
team(3) = "巴西"
team(4) = "古巴"
team(5) = "俄罗斯"
team(6) = "荷兰"
team(7) = "德国"
team(8) = "西班牙"
For i = 1 To 8
x = Int((9 - i) * Rnd + 1) '剩余随机选择
If i > 4 Then
teamA(i - 4) = team(x)
Else
teamB(i) = team(x)
End If
For j = x To 8
If j < 8 Then team(j) = team(j + 1)
Next
Next
Text1.Text = teamA(1) & Space(2) & teamA(2) & Space(2) & teamA(3) & Space(2) & teamA(4)
Text2.Text = teamB(1) & Space(2) & teamB(2) & Space(2) & teamB(3) & Space(2) & teamB(4)
End Sub
1team(1) = "中国"
2team(2) = "美国"
3team(3) = "巴西"
team(4) = "古巴"
team(5) = "俄罗斯"
team(6) = "荷兰"
team(7) = "德国"
team(8) = "西班牙"
For i = 1 To 8
x = Int((9 - i) * Rnd + 1) '剩余随机选择
If i > 4 Then
teamA(i - 4) = team(x)
Else
teamB(i) = team(x)
End If
For j = x To 8
If j < 8 Then team(j) = team(j + 1)
Next
Next
Text1.Text = teamA(1) & Space(2) & teamA(2) & Space(2) & teamA(3) & Space(2) & teamA(4)
Text2.Text = teamB(1) & Space(2) & teamB(2) & Space(2) & teamB(3) & Space(2) & teamB(4)
End Sub
0
推荐答案今天 14:15
Private Sub Command1_Click()
Dim team(8), teamA(4), teamB(4) As String, i%, j%
team(1) = "中国"
team(2) = "美国"
team(3) = "巴西"
team(4) = "古巴"
team(5) = "俄罗斯"
team(6) = "荷兰"
team(7) = "德国"
team(8) = "西班牙"
For i = 1 To 8
x = Int((9 - i) * Rnd + 1) '剩余随机选择
If i > 4 Then
teamA(i - 4) = team(x)
Else
teamB(i) = team(x)
End If
For j = x To 8
If j < 8 Then team(j) = team(j + 1)
Next
Next
Text1.Text = teamA(1) & Space(2) & teamA(2) & Space(2) & teamA(3) & Space(2) & teamA(4)
Text2.Text = teamB(1) & Space(2) & teamB(2) & Space(2) & teamB(3) & Space(2) & teamB(4)
End Sub