euler/c/euler001.c

15 lines
181 B
C
Raw Normal View History

2016-09-02 23:58:42 +00:00
#include "euler.h"
int main()
{
int sum = 0;
for (int i = 0; i < 1000; i++) {
if (i % 3 == 0 || i % 5 == 0) {
sum += i;
}
}
print_result(sum);
return 0;
}