cardel

Ejemplo prolog

Jun 28th, 2020
335
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Prolog 0.40 KB | None | 0 0
  1. %Base del conocimiento
  2.  
  3. matriculado("Juan","Calculo II").
  4. matriculado("Juan","Matemáticas discretas").
  5. matriculado("Pedro", "Calculo II").
  6. matriculado("Ana","Calculo III").
  7. matriculado("Erika","Calculo II").
  8. dicta("Efrain","Calculo III").
  9. dicta("Carlos","Matemáticas discretas").
  10. dicta("Duberney", "Calculo II").
  11.  
  12. %Reglas
  13. profesorDe(P,E) :- dicta(P,S), matriculado(E,S).
Add Comment
Please, Sign In to add comment