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
Forum rules
New release: CSPro 8.0
New release: CSPro 8.0
-
- Posts: 1777
- 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;