Enter two or more whole numbers to find their greatest common divisor and least common multiple.
GCD by Euclid's method: repeat (a, b) → (b, a mod b) until b is 0. LCM = a × b ÷ GCD.
12 and 18: 18 mod 12 = 6, 12 mod 6 = 0, so GCD = 6 and LCM = 12 × 18 ÷ 6 = 36.