num(1).num(X) :- X>0, write(X), X is X-1, num(X).
num(10).
GNU Prolog 1.3.1 By Daniel Diaz Copyright (C) 1999-2009 Daniel Diaz 10 no
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!