countdown(X) :- number(X), X < 0.countdown(X) :- number(X), X>=0, write(X), nl, NX is X-1, countdown(NX).
?- countdown(4).
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!