/**
 * Find the greatest common divisor (GCD) of two integers.
 */
fun gcd(a: Int, b: Int): Int {

    var num1 = a
    var num2 = b
    while (num2 != 0) {
        val temp = num1
        num1 = num2
        num2 = temp % num2
    }
    return num1
}
/**
 * Find the greatest common divisor (GCD) of two integers.
 */
fun gcd(a: Int, b: Int): Int {
/**
 * Find the greatest common divisor (GCD) of two integers.
 */
fun gcd(a: Int, b: Int): Int {

    var num1 = a
    var num2 = b
    while (num2 != 0) {
        val temp = num1
        num1 = num2
        num2 = temp % num2
    }
    return num1
}