Euclid's algorithm computes the greatest common divisor of two positive integers by repeatedly replacing the larger integer with the remainder of division by the smaller. The gcd remains unchanged through this transformation, and the process ends when the remainder is zero. section 7.3
Recursive gcd computation
For gcd(18, 30), the recursive call begins with gcd2(18, 30), computes 30 % 18, and continues with the remainder and 18 until the zero case returns the gcd.


