fork download
  1. fac( 0,1 ) :- !.
  2. fac( N, Nfac) :-
  3. N>0,
  4. M is N-1,
  5. fac( M, Mfac)
  6. Nfac is N * Mfac.
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
?- fac(5,X)
compilation info
prog.pl:6:1: syntax error: . or operator expected after expression
	1 error(s)
compilation failed
stdout
Standard output is empty