// Evenodd.java (c) 2004 Kari Laitinen // http://www.naturalprogramming.com // 2004-10-10 File created. // 2004-12-19 Last modification. import java.util.* ; class Evenodd { public static void main( String[] not_in_use ) { Scanner keyboard = new Scanner( System.in ) ; int integer_from_keyboard ; System.out.print( "\n This program can find out whether an integer" + "\n is even or odd. Please, enter an integer: " ) ; integer_from_keyboard = keyboard.nextInt() ; if ( ( integer_from_keyboard % 2 ) == 0 ) { System.out.print( "\n " + integer_from_keyboard + " is even.\n") ; } else { System.out.print( "\n " + integer_from_keyboard + " is odd. \n") ; } } }