Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- predicates
- go.
- max(integer,integer,integer).
- clauses
- go:-
- readint(X), readint(Y),readint(Z),
- max(X,Y,Z).
- max(X,Y,Z):- X>Y ,X>Z, write("the max is : ",X).
- max(X,Y,Z):- Y>X, Y>Z,write("the max is : ",Y).
- max(X,Y,Z):- write("max is : ",Z).
Advertisement
Add Comment
Please, Sign In to add comment