Skip to content

Instantly share code, notes, and snippets.

@chimericdream
Last active November 24, 2016 05:15
Show Gist options
  • Save chimericdream/92390e1406fb99459b37d9528f9cbc81 to your computer and use it in GitHub Desktop.
Save chimericdream/92390e1406fb99459b37d9528f9cbc81 to your computer and use it in GitHub Desktop.
Project Euler - Problem #1
$x = 0;
for ($i = 1; $i < 1000; $i++) {
if ($i % 3 == 0 || $i % 5 == 0) {
$x += $i;
}
}
echo $x;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment