#include <stdio.h> #include <stdlib.h> /* Puzzle A26 -- print a square of alternating stars and dots*/ int main(int argc, char *argv[]) { int row, col; int boardsize=16 ; for ( row=0; row<boardsize; row++ ) { for ( col=0; col<boardsize; col++ ) { if ( (row+col)%2 == 0 ) printf("*"); else printf("."); } printf("\n"); } printf("\n"); system("PAUSE"); return 0; }