package dz; public class dz { public static void main(String[] args) { boolean isPrime = true; int k=0; for (int i = 2; i <= 1000; i++) { for (int j = 2; j < i; j++) { if (i % j == 0) { isPrime = false; break; } } if (isPrime) System.out.println(i); isPrime=true; } System.out.println("Kolvo "+k); } }