辗转相除法(递归) gcd(24,16)==8 // 24/16=1......8 16/8==2 // 代码: int gcd(int x,int y){ if(x%y==0)return y; else return (gcd(y,x%y)); }