Answers for "what is euclid's algorithm"

C++
1

euclid algorithm

int Euclid(int a, int b)
{
    int r;
    while(b != 0) 
    {
         r = a % b;
         a = b; 
         b = r; 
    }
    return a; 
}
Posted by: Guest on December-28-2020
0

euclid algorithm

def MCD(a,b):
    while b != 0:
        a, b = b, a % b
    return a
Posted by: Guest on January-02-2021

Code answers related to "what is euclid's algorithm"

Browse Popular Code Answers by Language