Advertisement
marius7122

Untitled

Jul 12th, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.46 KB | None | 0 0
  1. #include <fstream>
  2. #include <iostream>
  3.  
  4. using namespace std;
  5.  
  6. ifstream fin("date.txt");
  7.  
  8. int mat[100][100], n, m, i, j;
  9.  
  10.  
  11. int main()
  12. {
  13.     fin>>n;
  14.     fin>>m;
  15.  
  16.     for(i = 0; i < n; i++)
  17.     {
  18.         for(j = 0; j < m; j++)
  19.         {
  20.             fin>>mat[i][j];
  21.         }
  22.     }
  23.  
  24.     for(i = 0; i < n; i++)
  25.     {
  26.         for(j = 0; j < m; j++)
  27.         {
  28.             cout<<mat[i][j]<<' ';
  29.         }
  30.         cout<<endl;
  31.     }
  32.  
  33.  
  34.     return 0;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement