//Reading indefinitely from stdin //Print all even numbers entered by the user import java.util.Scanner; class Even { public static void main (String [] args) { Scanner in = new Scanner (System.in); int num=0; while(in.hasNext()) //This checks if there is something to be read. Returns true is there is, false if there isn't. { num = in.nextInt(); // read the next integer if(num % 2 == 0) // print if it is even. { System.out.println(num); } } } }