fatalaa

Acsop3

Nov 24th, 2012
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.40 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main( int argc , char** argv )
  4. {
  5.     int N = 10;
  6.     int tomb[ N ];
  7.     int sum = 0;
  8.     int i;
  9.  
  10.     for( i = 0; i <= N; i++ )
  11.     {
  12.         scanf( "%d" , &tomb[ i ] );
  13.     }
  14.  
  15.     for( i = 0; i <= N; i++ )
  16.     {
  17.         if( tomb[ i ] >= -9 && tomb[ i ] <= 11 )
  18.         {
  19.             sum += tomb[ i ];
  20.         }
  21.     }
  22.  
  23.     printf( "%d\n" , sum );
  24.  
  25.     return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment