View Single Post
# 1 27-02-2006 , 12:40 PM
skywola's Avatar
Registered User
Join Date: Jan 2004
Location: Tempe, Arizona, USA
Posts: 224

How to detect odd or even numbers

How to Detect odd or even numbers in MEL

int $num = 1;
if ($num % 2 == 0)
print($num + " even");
else
print($num + " odd");
$num++;


"The Sage as an Astronomer: If you still see the stars as something above you, you lack the eye of knowledge." Friedrich Nietzsche