Link to home
Start Free TrialLog in
Avatar of STEELTIGER
STEELTIGER

asked on

VISUAL BASIC CODE

I know this is pretty basic but I'm looking for the correct VB code that determines if a number is ODD or EVEN.  In other words, when a user enters a number into an input box and clicks ok..what's the code that determines the number to be ODD or EVEN.  Thanks if anyone can help

STEELTIGER
ASKER CERTIFIED SOLUTION
Avatar of twalgrave
twalgrave

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The code above is correct.

Mod returns the remainder of a number (x listed above) divided by another number (2 listed above) so 2 Mod 2 = 0 and 7 Mod 2 returns 1

And so on

AD
homework?