can someone help a logic to check if a number is even or ODD
thank you
how check if the number is ODD or even
-
- Posts: 1796
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: how check if the number is ODD or even
You can check the remainder when dividing by two:
if VALUE % 2 = 0 then
errmsg("VALUE is EVEN");
endif;
errmsg("VALUE is EVEN");
endif;