You are testing whether the number is odd/even, not the function!
Quizmaster: In 1917 King George V changed the name of the British royal house from Saxe-Coburg Gotha to what?
All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.
Last edited by Philip M; 12-19-2012 at 02:01 PM..