Advertisement
Cucura_Georgiana

Varianta 99, Subiect 2

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