Starting from:

$19.99

Checkerboard_Solution

Checkerboard
=====================

Write a program `Checkerboard.java` that takes an integer command-line argument
`N`, and uses two nested for loops to print an N-by-N "checkerboard" pattern
like the one below: a total of `N^2` asterisks, where each row has `2N`
characters (alternating between asterisks and spaces).

```
% java Checkerboard 4
* * * *
* * * *
* * * *
* * * *
```

```
% java Checkerboard 5
* * * * *
* * * * *
* * * * *
* * * * *
* * * * *
```

---------------------

More products