1个回答
推荐于2017-10-13
展开全部
Private Sub Command1_Click()
Dim a As String
Dim n As Long
a = InputBox("输入一个正整数", "输入")
n = CLng(a)
If n Mod 2 = 0 Then
Print n; "是偶数"
Else
Print n; "是奇数"
End If
End Sub
Dim a As String
Dim n As Long
a = InputBox("输入一个正整数", "输入")
n = CLng(a)
If n Mod 2 = 0 Then
Print n; "是偶数"
Else
Print n; "是奇数"
End If
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询