Jump to content

Greatest common divisor: Difference between revisions

(add Fermat)
Line 2,337:
=={{header|Kotlin}}==
Recursive one line solution:
<lang kotlin>tailrec fun gcd(a: Int, b: Int): Int = if (b == 0) kotlin.math.abs(a) else gcd(b, a % b)</lang>
 
=={{header|LabVIEW}}==
Cookies help us deliver our services. By using our services, you agree to our use of cookies.