/* This trivial application reads a number n. If n is even, a message says so. In any case, the square of n is calculated and printed. */ import element.*; import structure.*; public class EasyIf { public static void main(String args[]) { ConsoleWindow c = new ConsoleWindow();// a window to read and print in int n; c.out.println("Choose a number:"); // ask for n n = c.input.readInt(); // read it if(n%2==0) // is n even? { c.out.println("The number "+n+" is even."); // if even, say so } c.out.println("The square of the number "+n+" is "+n*n); // in any case compute n squared. } }