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