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

max(X,Y,Z) :- X >= Y -> Z = X ; Z = Y.
