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

int gcd(int x,int y)
{
	return (!y)?x:gcd(y,x%y);
}

 

posted @ 2013-09-03 23:50  l851654152  阅读(303)  评论(0编辑  收藏  举报