Determining the greatest common divisor using the Euclidean Algorithm.
How do I use the Euclidean Algorithm for determining the greatest common divisor of two integers?© SolutionLibrary Inc. solutionlibary.com 9836dcf9d7 https://solutionlibrary.com/computer-science/software-development/determining-the-greatest-common-divisor-using-the-euclidean-algorithm-2gs
...(gcd) of 36 and 24. (it's 12)
We want to find gcd(36, 24). From the above algorithm, we use the following:
36 = 24q + r. A clear choice for q is 1. It is best to choose the biggest number
that you can for q, but it will frequently be small. Just don't exceed the value of a. For this reason, it also makes sense to have a be the larger number of the two.
36 = 24(1) + r. Solve for r!
r = 36 - 24 = 12.
Now we want to find gcd(b, r) = gcd(24, ...