vb编程怎么写?
发布网友
发布时间:2022-10-09 23:22
我来回答
共1个回答
热心网友
时间:2024-12-14 15:22
Private Sub Command1_Click()
Dim x As Integer
ji = 0
ou = 0
For i = 1 To 10
x = InputBox("请输入第" & i & "个整数:")
If x Mod 2 = 1 Then ji = ji + 1 Else ou = ou + 1
Next i
Text1 = "奇数 " & qi & " 个,偶数 " & ou & " 个"
End Sub