Sub t()
Dim i奇数 As Integer
i奇数 = 0
Dim i偶数 As Integer
i偶数 = 0
Dim allNumber As String
Dim iTemp As Integer
For i = 1 To 10
iTemp = Rnd * 90 + 10
If i > 1 Then
allNumber = allNumber & ","
End If
allNumber = allNumber & iTemp
If iTemp Mod 2 = 0 Then
i偶数 = i偶数 + 1
Else
i奇数 = i奇数 + 1
End If
Next
Debug.Print "allNumber = " & allNumber
Debug.Print "i奇数 = " & i奇数
Debug.Print "i偶数 = " & i偶数
End Sub
靠,居然没有注意,没有给分的。
算了,便宜你了