There's another trick you can use that's easier than the mod function (%)...
Integers are stored as binary values thus, every other value has the low order bit set to 1...
So you can use ... odd = x & 1 ... to test for odd and even.
For a quick reference to C's special characters...
Help -> Contents -> C Language Reference -> Expressions and Assignments -> Operator Precidence
You might want to mark the page in your help favorites.