Post History
ESCR, 17 bytes show [and [in] 1] ESCR has no way to read from standard input (currently), so I assumed the existence of the function IN which magically returns the user input. Since the user i...
Answer
#1: Initial revision
<h1><a href="http://www.embedinc.com/pic/escr/index.htm">ESCR</a>, 17 bytes</h1> <pre> show [and [in] 1] </pre> ESCR has no way to read from standard input (currently), so I assumed the existence of the function IN which magically returns the user input. Since the user input was specified to be an integer, the built-in AND function will do a bit-wise logical AND with the input number and 1. The result is 0 for even numbers and 1 for odd. The SHOW command writes the result of the AND function to standard output. The AND function will bomb the program with an error if the user does not enter an integer.