Previous Up Next

2.6.13  Test of evenness : even

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

even(148)

Output :

1

Input :

even(149)

Output :

0

Previous Up Next