12 and 18:
Divisors of 12 are 1, 2, 3, 4, 6 and 12
Divisors of 18 are 1, 2, 3, 6, 9 and 18
The common Divisors are 1, 2, 3 and 6. The greatest common divisor or GCD is 6
30 and 15:
Divisors of 30 are 1, 2, 3, 5, 15 and 30
Divisors of 15 are 1, 3, 5 and 15
The common Divisors are 1, 3, 5 and 15. The greatest common divisor or GCD is 15.
4 and 9:
Divisors of 4 are 1, 2 and 4
Divisors of 9 are 1, 3 and 9
There is only one common divisor 1. Hence GCD is 1.