// Uppgift 0 - Sum of all factors of 3 and 5 from 1 to 1000 public class test { public static void main(String[] args) { new test(); } public test() { int summa = 0; for(int i = 0; i <= 1000; i++){ //% // 8 % 3 = 2 // 1000 % 2 = 0 if(i % 3 == 0 || i % 5 == 0){ summa += i; } } System.out.println(summa); } }