Advertisement
marius7122

Untitled

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