Calculates the greatest common divisor (GCD) of two integers a and b.
a
b
static int gcd(int a, int b) => b == 0 ? a : gcd(b, a % b);