Computer Science, asked by atharva1136, 1 year ago

Write a program in vb to determine any given number is even or odd

Answers

Answered by frederickgomespakvin
0
Private Sub Command1_Click()
If CLng(Text1.Text) Mod 2 > 0 Then   
MsgBox "Odd Number"
Else   
MsgBox "Even Number"
End If
End Sub


NOTE: In Graphical Form We have 2 controls
1.  A Button - 
Command1
2.  A TextBox - Text 1

Similar questions