%DCC-FCUP - Logica e Programacao 2011-2012

membercheck(X,[X|_]):-!.
membercheck(X,[_|L]):- membercheck(X,L).

max1(X,Y,X):- X >= Y.
max1(X,Y,Y):- X< Y.

max(X,Y,X):- X >= Y, !.
max(X,Y,Y):- X< Y.

% not corrected: try max2(10,0,0).
max2(X,Y,X):- X >= Y, !.
max2(X,Y,Y).



