package firstproject; import java.io.ObjectInputStream.GetField; import java.security.DrbgParameters.NextBytes; import java.util.*; import java.util.function.IntToDoubleFunction; public class Test { public static void main(String[] args) { // TODO Auto-generated method stub int counter; for(int i = 500; i < 600; i++) { counter = 0; for(int j = 2; j < i; j++) { if(i % j == 0) { counter++; } } if(counter == 0) { System.out.println( i); } } } }