#include<iostream> using namespace std; void main() { int a[30][30]; int i,j,n; cout<<"nhap n: ";cin>>n; for(i=0;i<n;i++) for(j=0;j<n;j++) { cout<<"a["<<i<<"]["<<j<<"]="; cin>>a[j]; } cout<<"ma tran vuong vua nhap la: "<<endl; for(i=0;i<n;i++) { for(j=0;j<n;j++) cout<<a[j]<<" "; cout<<"\n"; } int s=0; for(i=0;i<n;i++) for(j=0;j<n;j++) if(a[j]!=a[j]); s=1; if(s==0) cout<<"day la ma tran doi xung qua duong cheo chinh !"<<endl; else cout<<"day ko phai la ma tran doi xung qua duong cheo chinh !"<<endl; }