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