Skip to main content

The "is_odd" Function

Syntax#

is_odd(n);
ArgumentTypeDescription
nrealA number to check parity of

Description#

Returns true if a given number is odd, and false if even. Invalid inputs will be returned as even.

Example#

if (is_odd(var_num)) {
show_message("I'm odd!");
} else {
show_message("I'm even!");
}