求两个数a、b的最大公约数

//求两个数a、b的最大公约数
function gcd(a,b){
    return b===0?a:gcd(b,a%b)
}

  

posted @ 2019-03-11 17:45  无工时代  阅读(333)  评论(0编辑  收藏  举报