Advertisement
cardel

Ejemplo MDI LPO

Jan 4th, 2021
2,019
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Prolog 0.42 KB | None | 0 0
  1. %hechos
  2. matriculado("Juan","Calculo III").
  3. matriculado("Juan","Matemáticas discretas").
  4. matriculado("Pedro", "Calculo II").
  5. matriculado("Ana","Calculo III").
  6. matriculado("Erika","Calculo II").
  7. dicta("Efrain","Calculo III").
  8. dicta("Carlos","Matemáticas discretas").
  9. dicta("Duberney", "Calculo II").
  10.  
  11. %reglas
  12. dicta(P,S) & matriculado(E,S)=> profesorDe(P,E) .
  13.  
  14. %Consulta a probar
  15. profesorDe(X,"Juan") => $ans(X).
  16.  
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement