Hello! Please help me solve it, I'm stuck, I can't do it myself...
package en.codegym.task.pro.task04.task0408;
import java.util.Scanner;
/*
Maximum of entered numbers
*/
public class Solution {
public static void main(String[] args) {
Scanner console = new Scanner(System.in);
int max = 0;
int num = 2;
while (console.hasNextInt()) {
int x = console.nextInt();
if((x % 2) == 0) x = max;
if (x > max) max = num;
}
System.out.println(max);
}
}