
:- set(c,3)?
:- modeb(1,gcd(+int,+int,-int))?
:- modeb(1,notzero(+int))?
:- modeb(1,zero(+int))?
:- modeb(1,modval(+int,+int,-int))?
:- modeh(1,gcd(+int,+int,-int))?

gcd(1,0,1).
gcd(2,0,2).
gcd(3,0,3).
gcd(4,0,4).
gcd(5,0,5).
gcd(6,0,6).
gcd(7,0,7).
gcd(8,0,8).
gcd(9,0,9).
gcd(10,0,10).

gcd(17,6,1).
notzero(6).
modval(17,6,5).
gcd(6,5,1).
notzero(5).
modval(6,5,1).
gcd(5,1,1).
notzero(1).
modval(5,1,0).

zero(0).

:- gcd(1,0,2).
:- zero(1).
:- zero(6).
:- zero(5).
:- zero(12).
:- notzero(0).
:- gcd(3,0,2).
:- gcd(4,0,2).
:- gcd(5,0,2).
:- gcd(6,0,2).
:- gcd(7,0,2).
:- gcd(8,0,2).
:- gcd(9,0,2).
:- gcd(10,0,2).
:- gcd(11,0,2).
:- gcd(8,4,8).
:- gcd(12,4,12).
:- gcd(8,6,8).
:- gcd(12,6,12).
