fork download
  1. factorial(0,1):- !.
  2. factorial(X, Y):-
  3. Y is X*Y,
  4. factorial(X-1, Y),
  5. write(Y).
Success #stdin #stdout 0.02s 68352KB
stdin
factorial(5,X).
stdout
GNU Prolog 1.3.1
By Daniel Diaz
Copyright (C) 1999-2009 Daniel Diaz
uncaught exception: error(instantiation_error,(is)/2)