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

int gcd(int a ,int b){
if(a%b!=0){
return gcd(b,a%b);
}
else{
return b;
}
}

posted @ 2020-08-17 11:34  Auterman  阅读(165)  评论(0)    收藏  举报