Skip to content

Instantly share code, notes, and snippets.

@daclouds
Last active December 17, 2015 06:18
Show Gist options
  • Save daclouds/e76635df14b020e54dcb to your computer and use it in GitHub Desktop.
Save daclouds/e76635df14b020e54dcb to your computer and use it in GitHub Desktop.
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