pop(1, 0) :- write('0'), nl.pop(X, Xp) := nl, write(), nl, X > 1, pop(Q, Qp), X is Q - 1.
pop(3).
prog.pl:2:12: syntax error: . or operator expected after expression 1 error(s) 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!