巧妙的编程集 求最大公约数 int gcd(int x,int y) { while(x!=y) //这个方法很精妙... { if(x>y) x=x-y; else y=y-x; } return x; }