Skip to content

Instantly share code, notes, and snippets.

@Riduidel
Created December 22, 2009 16:09
Show Gist options
  • Save Riduidel/261820 to your computer and use it in GitHub Desktop.
Save Riduidel/261820 to your computer and use it in GitHub Desktop.
sum = 0;
for(n in 1..1000-1) {
if(n%3==0 || n%5==0)
sum += n;
}
println sum;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment