прошу пояснить почему она проходит только в том случае если мы задаем изначально число макс мин Integer и с ним потом сравниваем и выводим public class Solution { public static void main(String[] args) { Scanner s = new Scanner(System.in); // obiavlaiem skaner int max = 2147483647; // obiavili max while (s.hasNextInt()) // poka v skanere 4isla { int n = s.nextInt(); if (n < max) // sravnivaem skaner s max, esli 4islo menshe max = 4islo max = n; } System.out.println(max); } } ВТОРАЯ ЗАДАЧА с кратностью двум public class Solution { public static void main(String[] args) { Scanner s = new Scanner(System.in); int min = -2147483648; while (s.hasNextInt()) { int n = s.nextInt(); if (n > min) if (n % 2 == 0) { min = n; } } System.out.println(min); } }