SimpleEuAlgDem
Euclidean Algorithm
Find the Greatest Common Divisor (GCD) step by step
How the Euclidean Algorithm Works
The Euclidean algorithm finds the Greatest Common Divisor (GCD) of two integers by repeatedly applying the division algorithm:
- Given non-negative two numbers and , ensure
- If , then
- Otherwise, replace with and with
- Repeat until