training

Code I wrote during training
git clone git://git.bitsmanent.org/training
Log | Files | Refs | README

dynchess.c (331B)


      1 /* 
      2  * Esercizio 3.40
      3  * Visualizzo una scacchiera con 3 printf(1);
      4 */
      5 
      6 #include <stdio.h>
      7 
      8 int main()
      9 {
     10    int x = 1, y; /* contatori */
     11 
     12    while(x <= 8) {
     13       y = 0;
     14       while(y < 8) {
     15          printf("* ");
     16 	 ++y;
     17       }
     18       printf("\n");
     19       if (x % 2)
     20 	 printf(" ");
     21       ++x; 
     22    }
     23 
     24    return 0;
     25 } /* E0F main */
     26