Step by step
The question
Question: find gcd(1260, 198) by Euclid's algorithm.
1 Divide the bigger by the smaller
Divide the bigger number by the smaller: 198 goes into 1260 6 times, and 72 is left over.
Here is the trick.
A number that goes into 1260 and 198 also goes into 72, because 72 is 1260 minus 6 × 198.
So the gcd does not change, and the numbers get smaller.
2 Keep going
Now the same with 198 and 72: the divisor moves left, the remainder becomes the new divisor.
72 = 1 × 54 + 18.
54 = 3 × 18, and the remainder is 0.
We stop.
3 The last remainder before 0
Careful!
0 only tells us to stop.
The answer is the last remainder before it: 18.
The last remainder that is not 0 is 18.
So gcd(1260, 198) = 18.
4 Check
18 goes into both: 1260 ÷ 18 is 70, and 198 ÷ 18 is 11.
And 70 and 11 have no common factor, so nothing bigger than 18 goes into both.
Right!
Let's look back.
First: divide the bigger by the smaller.
Then: keep going.
Then: the last remainder before 0.
Last: check.