Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

gcd c#

private static ulong GCD(ulong a, ulong b)
{
    while (a != 0 && b != 0)
    {
        if (a > b)
            a %= b;
        else
            b %= a;
    }

    return a | b;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #gcd
ADD COMMENT
Topic
Name
9+4 =