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