Answers for "gcd value of (7,9)"

C++
1

gcd of number

// pass two value to this function
    public static int HCF(int a, int b) 
    {
        while (b > 0) 
        {
            int temp = b;
            b = a % b; // % is remainder
            a = temp;
        }
        return a;
    }
Posted by: Guest on February-10-2022
0

GCD(x, yz)

long long g = gcd(x, y);
return g * gcd(x / g, z);
Posted by: Guest on October-27-2021

Browse Popular Code Answers by Language