Joel, I am trying and learning but this language sounds hard to me.... please help us as this can be used also as repository for the site. I just started to learn some programming, please please help
Give a tail-recursive definition for each of the following predicates.
power(X,Y,Z): XY=Z.
gcd(X,Y,Z): The greatest common divisor of X and Y is Z.
sum(L,Sum): Sum is the sum of the elements in L.
Thank you very much and God bless your day
thanks, if u happen to test in your machine, please please post it here. I am a beginner. by the way where is this language used for? thanks so much and God bless.
Joel, the professor gave only that:
Express the following relations and queries in Prolog:
niece(X,Y): X is a niece of Y.
aunt(X,Y): X is an aunt of Y.
relative(X,Y): X and Y are relatives.
Who are joe's children?
How many children does joe have?
Are joe and steph relatives?
the URL is...
I justed started prolog and wanted some help on doing the following:
Express the following relations and queries in Prolog:
niece(X,Y): X is a niece of Y.
aunt(X,Y): X is an aunt of Y.
relative(X,Y): X and Y are relatives.
Who are joe's children?
How many children does joe have?
Are joe...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.