Engineering Lab Files
B-tech. Engineering Lab Practicals Files of all subjects
Pages
Home
7 Semester
To find Factorial of a number - Artificial Intelligence Lab file
AIM
: To find Factorial of a number
domains
A=integer.
predicates
fact(A,A).
clauses
fact(1,1).
fact(X,Y):-
X1=X-1,
fact(X1,Y1),
Y=X*Y1.
Output:
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment