Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main(){
- int n, m, i, j;
- cout<<"n="; cin>>n;
- cout<<"m="; cin>>m;
- int A[n+1][m+1];
- for(i=1;i<=n;i++)
- for(j=1;j<=m;j++){
- if(i>j) A[i][j]=i; else A[i][j]=j;
- }
- for(i=1;i<=n;i++){
- for(j=1;j<=m;j++)
- cout<<A[i][j]<<" ";
- cout<<"\n";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement