countdown(1) :- write(1), !.countdown(N) :-write(N), nl,M is N - 1,countdown(M).
countdown(5).
GNU Prolog 1.3.1 By Daniel Diaz Copyright (C) 1999-2009 Daniel Diaz 5 4 3 2 1 yes
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!