Count each cell as it prints.
Hi guys, I have a program that prints a rectangle when you type the width and height as command line arguments. I have got it to print out the rectangle but What i am trying to do is make it count each cell and see if its odd/even. If its even, i want it to add another row and column to make it odd So i can make a hole in the middle of the rectangle i.e. miss a cell out:
int width = Integer.parseInt(args);
int height = Integer.parseInt(args);
for (int row = 1; row <= height; row++)
for (int column = 1; column <= width; column++)
// end the line.