Copyright | Copyright (C) 2021 Yoo Chung |
---|---|
License | GPL-3.0-or-later |
Maintainer | dev@chungyc.org |
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
Part of Ninety-Nine Haskell Problems. Some solutions are in Solutions.P32.
Documentation
myGCD :: Integral a => a -> a -> a Source #
Determine the greatest common divisor of two positive integer numbers. Use Euclid's algorithm.
Examples
>>>
myGCD 36 63
9
>>>
myGCD 125 81
1
>>>
myGCD 221 559
13