User Tools

Site Tools


codeq:prolog:naloge:sister_2

This is an old revision of the document!


Table of Contents

Opis

Predikat sister(X, Y) velja natanko takrat, kadar je X sestra od Y. Primer klica:

?- sister(vanessa, X).
  X = patricia.

Predznanje

parent(tina,william).
parent(thomas,william).
parent(thomas,sally).
parent(thomas,jeffrey).
parent(sally,andrew).
parent(sally,melanie).
parent(andrew,joanne).
parent(jill,joanne).
parent(joanne,steve).
parent(william,vanessa).
parent(william,patricia).
parent(vanessa,susan).
parent(patrick,susan).
parent(patricia,john).
parent(john,michael).
parent(john,michelle).

parent(frank,george).
parent(estelle,george).
parent(morty,jerry).
parent(helen,jerry).
parent(jerry,anna).
parent(elaine,anna).
parent(elaine,kramer).
parent(george,kramer).

parent(margaret,nevia).
parent(margaret,alessandro).
parent(ana,aleksander).
parent(aleksandr,aleksander).
parent(nevia,luana).
parent(aleksander,luana).
parent(nevia,daniela).
parent(aleksander,daniela).

male(william).
male(thomas).
male(jeffrey).
male(andrew).
male(steve).
male(patrick).
male(john).
male(michael).
male(frank).
male(george).
male(morty).
male(jerry).
male(kramer).
male(aleksandr).
male(alessandro).
male(aleksander).

female(tina).
female(sally).
female(melanie).
female(joanne).
female(jill).
female(vanessa).
female(patricia).
female(susan).
female(michelle).
female(estelle).
female(helen).
female(elaine).
female(anna).
female(margaret).
female(ana).
female(nevia).
female(luana).
female(daniela).

Namigi

codeq/prolog/naloge/sister_2.1436201995.txt.gz · Last modified: 2015/07/06 18:59 by timmy