2015-11-18 06:14:39 +00:00
|
|
|
# Algol 68 has a standard operator: ODD which returns TRUE if its integer #
|
2015-02-20 00:35:01 -05:00
|
|
|
# operand is odd and FALSE if it is even #
|
|
|
|
|
# E.g.: #
|
|
|
|
|
|
|
|
|
|
INT n;
|
|
|
|
|
print( ( "Enter an integer: " ) );
|
|
|
|
|
read( ( n ) );
|
|
|
|
|
print( ( whole( n, 0 ), " is ", IF ODD n THEN "odd" ELSE "even" FI, newline ) )
|