Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
15 lines (11 sloc) 217 Bytes
#include <stdio.h>
int main(int argc, const char * argv[]) {
int i, sum = 0;
for (i = 3; i < 1000; i++) {
if (i % 3 == 0 || i % 5 == 0) {
sum = sum + i;
}
}
printf("%d\n", sum);
return 0;
}