Even: If an integer is divided by 2 and the remainder is 0, then it is an Even number.
Odd: If an integer is divided by 2 and the remainder is not 0, then it is an Odd number.About this program
This program has 1 Label, 1 TextBox and a CommandButton.
It takes input from TextBox and clicking on the CommandButton it shows if the entered number is EVEN or ODD. We are using MsgBox to display the result.
Dim n As Integer
Private Sub command1_click()
n = Val(Text1.Text)
If (n Mod 2 = 0) Then
MsgBox "Even number"
MsgBox "Odd number"
Program to check Even or Odd – Visual Basic 6 -VB6