Determine if a Number is Even or Odd

From HotDocs Wiki

Jump to: navigation, search

Sometimes, you may need to find out if the answer a user enters for a Number variable is even or odd. The following computation uses a REMAINDER expression to divide the user's answer by two. If the remainder is 0, the number is even and the computation returns a value of TRUE. Otherwise, the number is odd and the result is FALSE.

Example

REMAINDER( Num Var, 2 ) = 0

Num Var Any Number variable