辗转相除法(欧几里得算法)

 int gcd(int a ,int b){
       if(a%b!=0){
                  return gcd(b,a%b);
       }
       else{
             return b;
       }      
 }
原文地址:https://www.cnblogs.com/Auterman/p/13516647.html