Advertisement
daniil_mironoff

| = | = | = | = | = |

Jun 17th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  1. using namespace std;
  2.  
  3. int const SIZE_1 = 4;
  4. int const SIZE_2 = 2;
  5.  
  6. int main() {
  7.     int arr[][SIZE_2]    = {{1, 11}, {2, 22}, {3, 33}, {4, 44}};
  8.        
  9.     for (int i = 0; SIZE_2 > i; i++) {
  10.         int temp           = arr[2][i];
  11.         arr[2][i]          = arr[SIZE_2 - 2][i];
  12.         arr[SIZE_1 - 2][i] = temp;
  13.     }
  14.        
  15.     return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement