I have a code in here
location(california, usa).
location('los angeles', california).
location(hollywood, 'los angeles').
look_on(Country,Place) :-
location(Place,X),write(X),nl,
look_on(Country,X),
fail.
if i query like this one
-?look_on(Place,stamp).
the output would be:
los angeles
californai
usa
,can anyone help me how to display only the the last data which is the usa?
im really stuck in this problem for an hour.
Thanks again for the help.