Home
Affiliated Colleges
Course content
First Sem
Second Sem
Third Sem
Fourth Sem
Fifth Sem
Sixth Sem
Seventh Sem
Eighth Sem
Lab report 4th sem
Contact
Sunday, March 14, 2010
ICS Lab: Create a list containing all integers with in a given range.
Create a list containing all integers with in a given range.
domains
int=integer
list_element=int*
predicates
list(int,int,list_element)
clauses
list(A,A,[A]).
list(A,B,[A|C]):-A<B,A1=A+1,list(A1,B,C).
goal
list(1,5,A).
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
^ Scroll to Top
^ Go to Top
No comments:
Post a Comment