Advertisement
STANAANDREY

mat_simetrica

May 20th, 2019
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int a[100][100],n,i,j,ok=1;
  6. float m1=0.0,m2=0.0;
  7. cout<<"n=";cin>>n;
  8. for (i=0;i<n;i++)
  9. for (j=0;j<n;j++)
  10.     cin>>a[i][j];
  11.  
  12. for (i=0;i<n;i++)
  13.     for (j=0;j<n;j++)
  14.     if (a[i][j]!=a[j][i]&&i!=j)
  15.     ok=0;
  16.   if (ok)
  17.   cout<<"DA";
  18.   else
  19.     cout<<"NU";
  20.   return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement