Advertisement
SVXX

Calculator

Mar 2nd, 2014
439
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Prolog 0.11 KB | None | 0 0
  1. Calc(X,Y,Z,op) :-
  2.     if op is + -> Z=X+Y;
  3.     if op is - -> Z=X-Y;
  4.     if op is * -> Z=X*Y;
  5.     if op is / -> Z=X/Y;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement