?- start. X= 4. Y= 6. R is 5 true. start:- write('X= '),read(X), write('Y= '),read(Y), R is (X + Y) / 2, write('R is '),write(R),nl.