Answers for "gcd of number"

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

C# Answers by Framework

Browse Popular Code Answers by Language