/**
 * Computes the greatest common divisor (gcd) of two integers using the Euclidean algorithm.
 *
 * @param a The first integer.
 * @param b The second integer.
 * @return The gcd of the two integers.
 */
fun gcd(a: Int, b: Int): Int {

    var numA = a
    var numB = b

    while (numB != 0) {
        // Find the remainder when a is divided by b
        val remainder = numA % numB

        // Update a to b and b to the remainder
        numA = numB
        numB = remainder
    }

    return numA
}
/**
 * Computes the greatest common divisor (gcd) of two integers using the Euclidean algorithm.
 *
 * @param a The first integer.
 * @param b The second integer.
 * @return The gcd of the two integers.
 */
fun gcd(a: Int, b: Int): Int {
/**
 * Computes the greatest common divisor (gcd) of two integers using the Euclidean algorithm.
 *
 * @param a The first integer.
 * @param b The second integer.
 * @return The gcd of the two integers.
 */
fun gcd(a: Int, b: Int): Int {

    var numA = a
    var numB = b

    while (numB != 0) {
        // Find the remainder when a is divided by b
        val remainder = numA % numB

        // Update a to b and b to the remainder
        numA = numB
        numB = remainder
    }

    return numA
}