Advertisement
Josif_tepe

Untitled

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