This program is written in BASIC using the above algorithm.
It uses the INT function in BASIC,
which evaluates the integer part of any number, ignoring the fractional part.
(This function is further explained if you click
here).
110 PRINT "TYPE IN AN INTEGER:"
120 INPUT N
130 LET H=N/2
140 IF H=INT(H) THEN 170
150 PRINT "That's an odd number."
160 GO TO 199
170 PRINT "That's an even number."
199 END