home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
prolog
/
library
/
prolo_c
/
exampl10.pro
< prev
next >
Wrap
Text File
|
1986-10-06
|
292b
|
19 lines
/* Program 10 */
/*
Goals to enter are on page 42 of the manual.
*/
domains
n, f = real
predicates
factorial(n,f)
clauses
factorial(1,1).
factorial(N,Res) if
N > 0 and
N1 = N-1 and
factorial(N1,FacN1) and
Res = N*FacN1.