Last active
November 5, 2016 23:26
-
-
Save OussaZaki/2402a5480dab97cd8aff0de8ed4f4b96 to your computer and use it in GitHub Desktop.
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
long long euler1(long long N) { | |
long long i, sum = 0; | |
for (i = 3; i < N; i++) { | |
if (i % 3 == 0 || i % 5 == 0) { | |
sum += i; | |
} | |
} | |
return sum; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment