Greatest common divisor: Difference between revisions
Content added Content deleted
(added go) |
|||
Line 575: | Line 575: | ||
Output: |
Output: |
||
<lang>11</lang> |
<lang>11</lang> |
||
=={{header|Go}}== |
|||
this is just a wrapper for <tt>big.GcdInt</tt> |
|||
<lang go>import "big" |
|||
func gcd(x, y int64) int64 { |
|||
result := new(big.Int) |
|||
big.GcdInt(result, nil, nil, big.NewInt(x), big.NewInt(y)) |
|||
return result.Int64() |
|||
}</lang> |
|||
=={{header|Groovy}}== |
=={{header|Groovy}}== |
||