Recursive finds and returns the greatest common divisor of a given integer.
(a, b int64)
| 5 | |
| 6 | // Recursive finds and returns the greatest common divisor of a given integer. |
| 7 | func Recursive(a, b int64) int64 { |
| 8 | if b == 0 { |
| 9 | return a |
| 10 | } |
| 11 | return Recursive(b, a%b) |
| 12 | } |
no outgoing calls