辗转相除法求最大公约数
public static void CalcGCD(int largeNumber, int smallNumber, out int GCD)
{
GCD = 1;
int remain = -1;
while (remain != 0)
{
remain = largeNumber % smallNumber;
GCD = smallNumber;
largeNumber = smallNumber;
smallNumber = remain;
}
}