home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 17 / CD_ASCQ_17_101194.iso / dos / prg / alb_c10 / chap_05 / ch05_11.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-09-08  |  558 b   |  27 lines

  1. /*********************************************************************
  2. *  CH05_11.C       Action sur l'instruction de fin de boucle dans for. *
  3. *********************************************************************/
  4.  
  5. #include<stdio.h>
  6.  
  7. main( void)
  8. {
  9.  
  10.     int i, somme= 0;
  11.  
  12.     for( i= 3; i< 14; i<<= 1)
  13.        {
  14.         somme+= i;
  15.         printf("\n i: %d\t somme= %d", i, somme);
  16.        }
  17.  
  18.     printf("\n Fin du programme  i: %d\t somme= %d",
  19.                             i, somme);
  20.  
  21. }
  22. /*
  23.  
  24.  i: 3     somme= 3
  25.  i: 6     somme= 9
  26.  i: 12     somme= 21
  27.  Fin du programme  i: 24    somme= 21                */