1 /*C How to Program, 6/E, Deitel & Deitel.
3 Solution of exercise 2.27:
4 (Checkerboard Pattern of Asterisks) Display the following checkerboard pattern
5 with eight printf statements and then display the same pattern with as few
6 printf statements as possible.
17 Written by Juan Carlos Moreno (jcmhsoftware@gmail.com), year 2018.*/
23 /* With eight printf statements */
24 printf("* * * * * * * *\n");
25 printf(" * * * * * * * *\n");
26 printf("* * * * * * * *\n");
27 printf(" * * * * * * * *\n");
28 printf("* * * * * * * *\n");
29 printf(" * * * * * * * *\n");
30 printf("* * * * * * * *\n");
31 printf(" * * * * * * * *\n\n");
33 /* Now, with one printf statement */
34 printf("* * * * * * * *\n"
41 " * * * * * * * *\n");