Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @tailrec
- def gcd(a: Int, b: Int): Int = {
- b match {
- case 0 => a
- case _ => gcd(b, (a % b))
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement