8 lines
369 B
Text
8 lines
369 B
Text
# Algol 68 has a standard operator: ODD which returns TRUE if its integer #
|
|
# 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 ) )
|