The greatest common divisor (GCD) of two or more numbers is the greatest common factor number that divides them, exactly.
It is also called the highest common factor (HCF).
A simple way to find GCD is to factorize both numbers and multiply common prime factors.
The Euclidean algorithm a way to find the greatest common divisor of two positive integers.
If A = B⋅Q + R and B≠0 then GCD(A,B) = GCD(B,R) where Q is an integer, R is an integer between 0 and B-1
SEE EXAMPLES
|