// http://en.wikipedia.org/wiki/Euclidean_algorithm // https://medium.com/i-math/why-does-the-euclidean-algorithm-work-aaf43bd3288e // gcd.tc - 8/25/11, 9/7/18 gcd int a,b [ if (b==0) return a else return gcd b,a%b ] main [ int a,b printf "%center a (e.g. 1071) : ",10 a=gn printf "%center b (e.g. 462) : ",10 b=gn printf "%cthe greatest common divisor of %d and %d is %d%c",10,a,b,gcd(a,b),10 ]