prolog
Division in prolog
I\'m trying to define the division in prolog using the remainder theorem and the well-ordering principle.[详细]
2023-04-13 09:47 分类:问答How to compute the sum of unpaired numbers up to N?
I have some code on prolog, but this code does not work. sum(N,_):-N<0,f开发者_Python百科ail. sum(N,S):-N=0,S=0,!.[详细]
2023-04-13 09:21 分类:问答Limit Printing of the prolog facts to THREE times?
Say I have 10 facts path(X) in the database. Ho开发者_JS百科w do I limit it to printing the first 3 from the database?[详细]
2023-04-13 08:36 分类:问答Prolog: DRY way of creating lists declaratively
I\'m doing some experiments with Prolog a开发者_如何学Gond having difficulties with the following rule:[详细]
2023-04-13 04:43 分类:问答test case generator using java [closed]
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references,or expertise, but this question will likely solicit debate, a[详细]
2023-04-12 21:46 分类:问答Adding integers in list
For so开发者_如何学运维me reason, this is not working. I am getting: ERROR: is/2: Arguments are not sufficiently instantiated[详细]
2023-04-12 21:46 分类:问答Prolog append list in a list
I have a list of lists, I want to append more lists to it. Suppose I have a list: L=[[A,B],[C,D]] I want to append a list[详细]
2023-04-12 20:56 分类:问答accessing prolog list term
I\'ve been using jpl for calling prolog from java. I\'m using the followi开发者_Python百科ng code in java to get the value of X from prolog.[详细]
2023-04-12 15:05 分类:问答Prolog how to print first 3 elements in a list
How can I print the first 3 elements in a list. 开发者_开发知识库 I have a print method print([]).[详细]
2023-04-12 06:58 分类:问答A prolog assignment which uses lists
I have an assignment that\'s driving me crazy.... Here\'s the assignment: The following contacts for people in a company are kept as facts as the followings:[详细]
2023-04-12 06:17 分类:问答