Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

extended euclidean algorithm to find x and y

int  greatestCommonDivisor(int m, int n)
{
    if(n == 0) return m;

    return greatestCommonDivisor(n, m % n);
}
Source by brilliant.org #
 
PREVIOUS NEXT
Tagged: #extended #euclidean #algorithm #find
ADD COMMENT
Topic
Name
3+3 =