blob: ff24a08fbeae92dc9b097adb3ccd570a732d52eb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#include <stdio.h>
#include <stdlib.h>
//Problem 1: multiples of 3 and 5
int main(){
int max = 1000;
int i, sum = 0;
for (i; i<max; i++)
if (!(i%3) || !(i%5))
sum+=i;
printf("%d\n", sum);
}
|