Advertisement
artur99

Untitled

Jul 13th, 2015
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.36 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main(){
  4.     int n, m, i, j;
  5.     cout<<"n="; cin>>n;
  6.     cout<<"m="; cin>>m;
  7.     int A[n+1][m+1];
  8.     for(i=1;i<=n;i++)
  9.         for(j=1;j<=m;j++){
  10.             if(i>j) A[i][j]=i; else A[i][j]=j;
  11.         }
  12.     for(i=1;i<=n;i++){
  13.         for(j=1;j<=m;j++)
  14.            cout<<A[i][j]<<" ";
  15.         cout<<"\n";
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement