Created
August 30, 2013 16:06
-
-
Save randyzwitch/6391427 to your computer and use it in GitHub Desktop.
Julia smallest divisible number
This file contains hidden or 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
function smallestdivisall(n::Int64) | |
for i = 1:factorial(n) | |
for j = 1:n | |
if i % j !=0 | |
break | |
elseif j == n | |
return i | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment