prax02
This commit is contained in:
parent
d31d517993
commit
3682b3d9cd
41
PR02/prax02.pl
Executable file
41
PR02/prax02.pl
Executable 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).
|
||||
|
Loading…
Reference in New Issue
Block a user