Euclid's Algorithm
Ever wanted to find the greatest common divsor (GCD) of two numbers, but were too lazy? Here's a quick solution for you!
Steps
- Subtract the smaller number from the bigger number.
- Repeat step 1 until the two numbers are equal.
- The number stored in these resulting two equal values is the GCD of the original two numbers.
Source 1
Diagram
Source 2
23:50 | 23 November 2022 | Lawrence Su | CS 400 | Week 11 HTML Activity