Advertisement
Josif_tepe

Untitled

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