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
August 27, 2024
Use Euclid’s algorithm.
scala
scala> gcd(36, 63)
res0: Int = 9
Don't have an account? We will create one for you.
Enter the OTP send to
in seconds.