/**
 * Calculates the greatest common divisor (GCD) of two integers.
 *
 * @param a The first integer.
 * @param b The second integer.
 * @return The GCD of the two integers.
 */
fun calculateGcd(a: Int, b: Int): Int {

    var numA = a
    var numB = b

    // Perform Euclidean algorithm to find GCD
    while (numB != 0) {
        val temp = numA
        numA = numB
        numB = temp % numB
    }
    return numA
}
/**
 * Calculates the greatest common divisor (GCD) of two integers.
 *
 * @param a The first integer.
 * @param b The second integer.
 * @return The GCD of the two integers.
 */
fun calculateGcd(a: Int, b: Int): Int {
/**
 * Calculates the greatest common divisor (GCD) of two integers.
 *
 * @param a The first integer.
 * @param b The second integer.
 * @return The GCD of the two integers.
 */
fun calculateGcd(a: Int, b: Int): Int {

    var numA = a
    var numB = b

    // Perform Euclidean algorithm to find GCD
    while (numB != 0) {
        val temp = numA
        numA = numB
        numB = temp % numB
    }
    return numA
}