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