home *** CD-ROM | disk | FTP | other *** search
/ C by Discovery (4th Edition) / C_By_Discovery_4th_Edition.tar / C_By_Discovery_4th_Edition / _DISK_ / ch2 / epp13.c < prev    next >
C/C++ Source or Header  |  2005-06-16  |  483b  |  28 lines

  1. /*                epp13.c                 */
  2.     
  3. /* Include Files */
  4. #include <stdio.h>
  5.  
  6. int main( void )
  7. {
  8.      int i, count = 0;
  9.  
  10.      for ( i = 8; i >= 0; i-- ) {
  11.           if ( !( i%4 ) || ( i--%3 ) ) {
  12.                i--;
  13.                count++;
  14.           }
  15.      }
  16.  
  17.      printf( "%d\n", count );
  18.  
  19.      printf( "%d\n", count && ++i );
  20.  
  21.      printf( "%d\n", !count );
  22.  
  23.      printf( "%d\n", i > 0 );
  24.  
  25.      printf( "%d\n", 0 < count < 3 );
  26.      return 0;
  27. }
  28.