gcd(X,X,X).gcd(X,Y,G) :- X<Y, Y1 is Y-X, gcd(X,Y1,G).gcd(X,Y,G) :- X>Y, X1 is X-Y, gcd(Y,X1,G).
Standard input is empty
Standard output is empty
ERROR: '$runtoplevel'/0: Undefined procedure: program/0 Exception: (3) program ? EOF: exit
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!