Advertisement
Guest User

Untitled

a guest
Nov 28th, 2014
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.29 KB | None | 0 0
  1. public class Square
  2. {
  3.  public static void main (String[] args)
  4.  {
  5.  System.out.println("Output the squares: ");
  6.  System.out.println(" N N^2");
  7.  for (int i = 2; i <=12; i+=2 )
  8.  {
  9.  if (i != 8) /*or if ( i%8 != 0) */
  10.  System.out.printf("%5d %5d\n", i, i*i);
  11.  }
  12.  } //end main
  13. } // end of class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement