Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Checkerboard {
- public static void main (String[] args) {
- int N = Integer.parseInt(args[0]);
- for (int x = 0; x < N; x++) {
- if (x % 2 == 0) {
- System.out.print(" ");
- }
- for (int y = 0; y < N; y++) {
- System.out.print("* ");
- }
- System.out.println ();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement