用辗除法求两个数的最大公约数

int gcd(int x,int y)
{
	return (!y)?x:gcd(y,x%y);
}
原文地址:https://www.cnblogs.com/liuweilinlin/p/3300196.html