C89/Euler35/Euler35.c

14 lines
177 B
C
Raw Normal View History

2019-03-09 17:44:45 -05:00
#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;
}