Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Square
- {
- public static void main (String[] args)
- {
- System.out.println("Output the squares: ");
- System.out.println(" N N^2");
- for (int i = 2; i <=12; i+=2 )
- {
- if (i != 8) /*or if ( i%8 != 0) */
- System.out.printf("%5d %5d\n", i, i*i);
- }
- } //end main
- } // end of class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement