fatalaa

Bcsop4

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