Код: Выделить всё
public class Main
{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.print("Enter the range : ");
int n1=sc.nextInt();
int n2=sc.nextInt();
int fl=0;
for(int i=n1;i
Подробнее здесь: [url]https://stackoverflow.com/questions/73415938/prime-numbers-in-a-given-range-in-java[/url]
Мобильная версия