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
the output would be:
,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.