Advertisement
Guest User

Ex1

a guest
Dec 5th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Prolog 0.36 KB | None | 0 0
  1. passaro('Marcelo').
  2. peixe('Silvio').
  3. minhoca('Ana').
  4. pessoa('Eu').
  5.          
  6. gosta(X, Y) :- passaro(X), minhoca(Y).
  7. gosta(X, Y) :- gato(X), peixe(Y).
  8. gosta(X, Y) :- gato(X), peixe(Y).
  9.  
  10. amigo('Eu', 'Chuck Norris').
  11.  
  12. gato('Chuck Norris').
  13.  
  14. come('Chuck Norris', Y) :- gosta('Chuck Norris', Y), not(pessoa(Y)).
  15.  
  16. gosta('Marcelo', X).
  17. come('Chuck Norris', Y).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement