VB Program - To find out whether the number is Even number or Odd number?
Program:
Sub EvenOdd()
Dim varNum
varNum = InputBox("Enter a number")
If varNum Mod 2 = 0 Then
MsgBox varNum + " is a even number"
varNum = InputBox("Enter a number")
If varNum Mod 2 = 0 Then
MsgBox varNum + " is a even number"
Else
MsgBox varNum + " is a odd number"
MsgBox varNum + " is a odd number"
End If
No comments:
Post a Comment