-
-
Save daclouds/e76635df14b020e54dcb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object Euler5 extends App { | |
def divAll(start: Int = 1, end: Int, num: Int): Int = { | |
if (start == end) num | |
else if (num % start == 0) divAll(start+1, end, num) | |
else divAll(end = end, num = num+1) | |
} | |
println(divAll(1,20,20)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment