CS计算机代考程序代写 directlyIn(irina, natasha).

directlyIn(irina, natasha).
directlyIn(natasha, olga).
directlyIn(olga, katarina).

contains(X, Y) :-
directlyIn(Y, X);
directlyIn(Y, Z), contains(Z, Y).

test_answer :-
contains(katarina, natasha),
write(‘OK’),
halt.

test_answer :- write(‘Wrong answer!’),
halt.