题目描述
Draw a chessboard which has a height of H cm and a width of W cm. For example, the following figure shows a chessboard which has a height of 6 cm and a width of 10 cm.
1 | #.#.#.#.#. |
Note that the top left corner should be drawn by ‘#’.
输入
The input consists of multiple datasets. Each dataset consists of two integers H and W separated by a single space.
The input ends with two 0 (when both H and W are zero).
输出
For each dataset, print the chessboard made of ‘#’ and ‘.’.
Print a blank line after each dataset.
题解
1 | #include<iostream> |