Previous Up Next

5.6.14  Test of oddness: odd

odd takes as argument an integer n.
odd returns 1 if n is odd and returns 0 if n is even.
Input:

odd(148)

Output:

0

Input:

odd(149)

Output:

1

Previous Up Next