Euclids algorithm

views updated

Euclid's algorithm An algorithm for finding the greatest common divisor of two integers, m and n. If m > n divide m by n and let r be the remainder. If r = 0 then n is the answer; otherwise apply the same algorithm to the integers n and r.