August 27, 2024

P32 - Determine the greatest common divisor of two positive integer numbers.

Use Euclid’s algorithm.

scala

scala> gcd(36, 63)
res0: Int = 9
Be first to comment
Leave a reply