rsa.c
long calculateGCD(long a, long b)
{
    long n1 = (a > 0) ? a : -a;
    long n2 = (b > 0) ? b : -b;
    long reminder;
    if (n1 > n2)
    {
        reminder = n1;
        n1 = n2;
        n2 = reminder;
    }
    while (true)
    {
        reminder = n1 % n2;
        if (reminder == 0)
        {
            return n2;
        }
        n1 = n2;
        n2 = reminder;
    }
}
/* calculate GCD of 2 numbers  GCD for both positive and negative numbers in recursion */
calculate GCD of 2 numbers  GCD for both positive and negative numbers in recursion
calculate GCD of 2 numbers GCD for both positive and negative numbers in recursion
long calculateGCD(long a, long b)
{
    long n1 = (a > 0) ? a : -a;
    long n2 = (b > 0) ? b : -b;
    long reminder;
    if (n1 > n2)
    {
        reminder = n1;
        n1 = n2;
        n2 = reminder;
    }
    while (true)
    {
        reminder = n1 % n2;
        if (reminder == 0)
        {
            return n2;
        }
        n1 = n2;
        n2 = reminder;
    }
}
long calculateGCD ( long a , long b ) { long n1 = ( a > 0 ) ? a : - a ; long n2 = ( b > 0 ) ? b : - b ; long reminder ; if ( n1 > n2 ) { reminder = n1 ; n1 = n2 ; n2 = reminder ; } while ( true ) { reminder = n1 % n2 ; if ( reminder == 0 ) { return n2 ; } n1 = n2 ; n2 = reminder ; } }
calculate GCD of 2 numbers  GCD for both positive and negative numbers in recursion
calculate GCD of 2 numbers GCD for both positive and negative numbers in recursion