Guest User

Untitled

a guest
Jan 4th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. :-use_module(library(clpfd)).
  2.  
  3. employees([
  4. [1, 75, 0, 30, 25],
  5. [2, 83, 0, 45, 25],
  6. [3, 90, 1, 45, 50],
  7. [4, 45, 3, 75, 25],
  8. [5, 89, 0, 52, 50]
  9. ]).
  10.  
  11. eligible(E):-
  12. check_employee(E),
  13. employees(Es),
  14. tuples_in([E], Es),
  15. label(E).
  16.  
  17. check_employee([_, Rv, Sf, Tm, Pr]):-
  18. Rv #>= 80, Sf #=< 1, Tm #> Pr.
Add Comment
Please, Sign In to add comment