by Hiten Patel (3 Submissions)
Category: Math/Dates
Compatability: Visual Basic 3.0
Difficulty: Unknown Difficulty
Originally Published: Sun 3rd June 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
There are two type for finding Odd & Even Numbers
'Create one project called OddEven & write down this code in Command1 Click Event
Private Sub Command1_Click()
if Val(Text1) Mod 2 = 0 then
Msgbox "Even"
else
Msgbox "Odd"
End if
' OR Second Method is
if val(Text1.Text) / 2= Round(val(Text1.Text) / 2,0) then
Msgbox "Even"
else
Msgbox "Odd"
End if
End Sub
'Hi there send me reply how you like this code @ [email protected]