oddEven(X) :- X > 0, 1 is X mod 2./* V is mod(X,2), V == 0, write('even'), V == 1, write('odd'), RET is V.*/
oddEven(9).
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!