Advertisement
Guest User

Untitled

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