VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



There are two type for finding Odd & Even Numbers

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

Rate 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]

Download this snippet    Add to My Saved Code

There are two type for finding Odd & Even Numbers Comments

No comments have been posted about There are two type for finding Odd & Even Numbers. Why not be the first to post a comment about There are two type for finding Odd & Even Numbers.

Post your comment

Subject:
Message:
0/1000 characters