Skip to content

Instantly share code, notes, and snippets.

@Seregamil
Created April 2, 2020 11:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Seregamil/ba580a1e3879d86aa4f2dbc401d852eb to your computer and use it in GitHub Desktop.
Save Seregamil/ba580a1e3879d86aa4f2dbc401d852eb to your computer and use it in GitHub Desktop.
student('Ivanov', 4).
student('Fedorov', 3).
student('Vetrov', 4).
student('Petrov', 3).
student('Popov', 4).
student('Sidorov', 5).
company('Microsoft', 5).
company('Apple', 4).
company('IBM', 4).
company('Samsung', 4).
company('MaximCo', 3).
has_stip(Name) :-
student(Name, X),
X > 4.
can_work_in_company(Name, Company) :-
student(Name, X),
company(Company, Y),
X >= Y.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment