Advertisement
Guest User

Untitled

a guest
Apr 26th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.39 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int matrix[6][6];
  6.  
  7. int main() {
  8.    
  9.     for(int i = 0; i < 4; i++) {
  10.         for(int j = 0; j < 5; j++) {
  11.             cin >> matrix[i][j];
  12.         }
  13.     }
  14.    
  15.     for(int i = 0; i < 3; i++) {
  16.         for(int j = 0; j < 5; j++)
  17.             matrix[i][j]--;
  18.     }
  19.  
  20.     for(int i = 0; i < 4; i++) {
  21.         for(int j = 0; j < 5; j++) {
  22.             cout >> matrix[i][j] << " ";
  23.         }
  24.         cout << endl;
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement