Advertisement
Josif_tepe

Untitled

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