Advertisement
Teammasik

Paradigmas_prolog_lr2

May 13th, 2023
740
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Prolog 0.91 KB | None | 0 0
  1. subjects('1 Sep', 1, 2, 3).
  2. subjects('2 Sep', 2, 3, 4).
  3. subjects('3 Sep', 1, 2, 3).
  4. subjects('4 Sep', 3, 5, 6).
  5. subjects('5 Sep', 4, 5, 6).
  6. subjects('6 Sep', 1, 2, 5).
  7. subjects('8 Sep', 5, 6, 7).
  8. subjects('9 Sep', 4, 5, 7).
  9. subjects('10 Sep', 2, 4, 5).
  10. subjects('11 Sep', 2, 4, 5).
  11. subjects('12 Sep', 2, 3, 4).
  12. subjects('14 Sep', 1, 2, 3).
  13. subjects('15 Sep', 2, 3, 4).
  14. subjects('16 Sep', 3, 5, 6).
  15.  
  16. printing:- subjects(X,Y,Z,W),write(' '),write(X),write(', '),write(Y),write(' '),write(Z),write(' '),write(W),nl,fail.
  17. one_attr(Z):- subjects(X,Y,Z,W),write(' '),write(X),write(', '),write(Y),write(' '),write(Z),write(' '),write(W),nl,fail.
  18. two_attr(Y, Z):-subjects(X,Y,Z,W),write(' '),write(X),write(', '),write(Y),write(' '),write(Z),write(' '),write(W),nl,fail.
  19. sec_attr(X, Z):-subjects(X,Y,Z,W),write(' '),write(X),write(', '),write(Y),write(' '),write(Z),write(' '),write(W),nl,fail.
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement