training

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

scacchiera.c (628B)


      1 /* Esercizio 2.27 (Cap. 2)
      2    Stampa una scacchiera prima con 8 printf(1),
      3    infine col minor numero di printf(1) possibiile. */
      4 
      5 #include <stdio.h>
      6 
      7 int main()
      8 {
      9    printf("* * * * * * * *\n");
     10    printf(" * * * * * * * *\n");
     11    printf("* * * * * * * *\n");
     12    printf(" * * * * * * * *\n");
     13    printf("* * * * * * * *\n");
     14    printf(" * * * * * * * *\n");
     15    printf("* * * * * * * *\n");
     16    printf(" * * * * * * * *\n\n");
     17 
     18    printf("* * * * * * * *\n * * * * * * * *\n* * * * * * * *\n * * * * * * * *\n"
     19            "* * * * * * * *\n * * * * * * * *\n* * * * * * * *\n * * * * * * * *\n");
     20 
     21    return 0;
     22 } /* E0F main */
     23