Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. public class Checkerboard {
  2. public static void main (String[] args) {
  3. int N = Integer.parseInt(args[0]);
  4. for (int x = 0; x < N; x++) {
  5. if (x % 2 == 0) {
  6. System.out.print(" ");
  7. }
  8. for (int y = 0; y < N; y++) {
  9. System.out.print("* ");
  10. }
  11. System.out.println ();
  12. }
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement