vba怎么判斷奇偶性?
Private Sub Command1_Click() Dim I As Long I = InputBox("請輸入任意數(shù)字:"
) If I Mod 2 = 1 Then MsgBox "奇數(shù)" Else MsgBox "偶數(shù)" End If End Sub
vba怎么判斷奇偶性?
Private Sub Command1_Click() Dim I As Long I = InputBox("請輸入任意數(shù)字:"
) If I Mod 2 = 1 Then MsgBox "奇數(shù)" Else MsgBox "偶數(shù)" End If End Sub