EUCLIDEAN GCD ALGORITHM USING RECURSION

view code for this file here

Define

|   x, if y=0
gcd(x,y)= |
|   gcd(y, x MOD y), if y>0

where gcd stands for Greatest Common Divisor and (x MOD y) is the remainder when x is divided by y. Given Integers x,y>0 this program calculates using recursion gcd(x,y).

x
y