Puzzle L24


Print a square divided into 8 horizontal bands of alternating stars and dots

[M-8]Write a main() program that prints an n by n square of characters. Divide the square into 8 horizontal bands. The bands alternate between star and dot. Declare n as a variable. Here is the output when n==16:

****************
****************
................
................
****************
****************
................
................
****************
****************
................
................
****************
****************
................
................


Answer         Next Page         Previous Page Home