package java_programs;

public class GCD {

    public static int gcd(int a, int b) {
        if (b == 0) {
            return a;
        } else {
            return gcd(b, a % b);
        }
    }

    public static void main(String[] args) {
        System.out.println(gcd(10, 5)); // Output should be 5
        System.out.println(gcd(25, 15)); // Output should be 5
        System.out.println(gcd(65, 25)); // Output should be 5
        System.out.println(gcd(111, 259)); // Output should be 37
        System.out.println(gcd(0, 5)); // Output should be 5
        System.out.println(gcd(12, 0)); // Output should be 12
        System.out.println(gcd(0, 0)); // Output should be 0
    }
}