Skip to content

Instantly share code, notes, and snippets.

@dgodfrey206
Last active August 29, 2015 14:05
Show Gist options
  • Save dgodfrey206/ffe6d2a786a5da156eab to your computer and use it in GitHub Desktop.
Save dgodfrey206/ffe6d2a786a5da156eab to your computer and use it in GitHub Desktop.
Project Euler #1
// Answer: 233168
int main()
{
int sum(0);
for (int i = 0; i < 1000; ++i) {
if ((i % 3 == 0) || (i % 5 == 0)) sum += i;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment