oddEven(X, RET) :- X > 0, V is mod(X,2), ANS is V.
oddEven(2, ANS).
GNU Prolog 1.3.1 By Daniel Diaz Copyright (C) 1999-2009 Daniel Diaz yes
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!