1
0
Fork 0
This commit is contained in:
Arti Zirk 2018-09-19 12:14:38 +03:00
parent d31d517993
commit 3682b3d9cd
1 changed files with 41 additions and 0 deletions

41
PR02/prax02.pl Executable file
View File

@ -0,0 +1,41 @@
#!/usr/bin/swipl
married(liisa, joosep).
married(anne,vello).
mother(evelin,anne).
mother(mikk, anne).
mother(juku, anne).
mother(anne, liisa).
mother(mart, liisa).
female(anne).
female(evelin).
female(anne).
male(vello).
male(mikk).
male(juku).
male(mart).
father(Laps, Isa):-
mother(Laps, Ema),
married(Ema, Isa),
male(Isa).
brother(Laps, Vend):-
mother(Laps, Ema),
mother(Vend, Ema),
Laps \= Vend,
male(Vend).
sister(Laps, Ode):-
mother(Laps, Ema),
mother(Ode, Ema),
Laps \= Ode,
female(Ode).
uncle(Laps, Uncle):-
mother(Laps, Ema),
brother(Ema, Uncle).
uncle(Laps, Uncle):-
father(Laps, Isa),
brother(Isa, Uncle).