r(0):- write('even').r(1):- write('odd'). c(X):- NX is mod(X,2), r(NX).
c(100). c(101). c(100). c(101).
GNU Prolog 1.3.1 By Daniel Diaz Copyright (C) 1999-2009 Daniel Diaz even yes odd yes even yes odd yes
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!