C89/Euler35/Euler35.c
2019-03-10 11:44:45 +13:00

14 lines
177 B
C

#include <stdio.h>
int main(void){
int i = 0;
int sum = 0;
int max = 15;
for (i=1;i<=max;i++){
if (i%3 == 0 || i%5 == 0){
sum = sum + i;
}
}
printf("%d\n", sum);
return 1;
}