countdown(0) :-write(0), nl,!.countdown(X) :-X > 0, write(X), nl,Y is X-1,countdown(Y).
countdown(15).
GNU Prolog 1.3.1 By Daniel Diaz Copyright (C) 1999-2009 Daniel Diaz 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 yes
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!