Created
August 5, 2012 03:06
-
-
Save anonymous/3261309 to your computer and use it in GitHub Desktop.
Tom made me do it
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
## to find the value of the sum of all the multiples of 3 and 5 less than or equal to 1000 | |
n = (1000/5).rounddown(0) | |
m = (1000/3).rounddown(0) | |
x = sum [0:n]*5 | |
y = sum [0:m]*3 | |
answer = x + y |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment