Find the greatest common divisor and least common multiple of integer inputs.
The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.
Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.
The Euclidean algorithm repeatedly replaces a pair with divisor and remainder until the remainder is zero; the final absolute divisor is the GCD. The LCM is absolute product divided by GCD, extended across the list.
12, 18
GCD(12, 18) = 6 LCM(12, 18) = 36
Schedules find shared cycles, fraction reducers find common divisors, and number-theory lessons compare GCD with LCM.