printCheckerboard 🌶️🌶️
Write a method printCheckerboard that takes an int n and prints an n by n checkerboard: n lines of n characters each, alternating X and ., with X in the top-left corner. For printCheckerboard(3) the output is
X.X.X.X.X
A square is X when row and column have something in common. Look at the positions of the X squares in a 3 by 3 board: (0,0), (0,2), (1,1), ...
The X squares are the ones where row + col is even. Use an if/else inside the inner loop, and println after the inner loop.