Skip to content

Instantly share code, notes, and snippets.

@Getaji
Created November 20, 2013 13:22
Show Gist options
  • Save Getaji/7563082 to your computer and use it in GitHub Desktop.
Save Getaji/7563082 to your computer and use it in GitHub Desktop.
import std.stdio;
int main(string[] argv) {
int ct;
foreach (int i; 3..999)
if (i % 3 == 0 || i % 5 == 0) ct += i;
writeln(ct);
readln();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment