Answers for "pesudo code for eulars greatest commmon divisor"

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
2

gcd algorithm

function gcd(a, b)
    if b = 0
        return a
    else
        return gcd(b, a mod b)
Posted by: Guest on September-22-2020

Code answers related to "pesudo code for eulars greatest commmon divisor"

Browse Popular Code Answers by Language