> 
> Find the sum of all the multiples of 3 or 5 below 1000.
> 
> 
> 

My program works for siphoning out all the multiples of 3 and 5, but when I run it to 1000 it only prints out the multiples of 3 and 5 from 363 onwards. 

My question is, why? This is my code:

```
class threeAndFive {
    public static void main(String[] args) {
        for(int i = 1; i < 1000; i++) {
            if (i % 3 == 0) {
                System.out.println(i);
            } else if (i % 5 == 0) {
                System.out.println(i);
            } else if (i % 3 == 0 && i % 5 == 0) {
                System.out.println(i);
            }
        }
    }
}

```

Sample of output:

The first 7 lines of output are

```
363
365
366
369
370
372
375

```

The last 7 lines of output are

```
985
987
990
993
995
996
999

```

So how come, if judging by my for loop it should iterate from 3 right up to 999, it is starting output at 363?

EDIT

I found that I was meant to be finding the SUM, not printing out the numbers. 
Either way, my question still stands.