even(C,N) :- C is N.write('even') :- C rem 2 =/= 0.write('odd') :- X rem 2 =:= 0.
?- even(X,5)
prog.pl:2:26: syntax error: . or operator expected after expression prog.pl:3: fatal error: redefining built-in predicate write/1 compilation failed
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!