求 余

阅读 37

2023-04-11


> (remainder 21
             3)
0
> (remainder 21
             2)
1



最大公约数


> (define (gcd a b)
    (if (= b 0)
        a
        (gcd b (remainder a b))))
> (gcd 20 6)
2

相关推荐

精彩评论(0)

0 0 举报