#include <iostream> using namespace std; void nhap(int a[][100],int n) { int i,j; for(i=0;i<n;i++) for(j=0;j<n;j++) { cout<<"A["<<i<<" "<<j<<"]="; cin>>a[j]; } } void kiemtra(int a[][100],int n) { int kq=0; int i,j; for(i=0;i<n;i++) for(j=0;j<n;j++) { if(a[j]==a[j]) kq=1; else {kq=0;break;} } if(kq==1) cout<<"Matranx doi xung"<<endl; else cout<<"Matranx khong doi xung<<endl"; } void main() { int n; int a[100][100]; cout<<"\n\nNhap hang=cot\n\n________________________________________\n\n"; cin>>n; cout<<"\n\nNhap Matranx\n\n_____________________________________\n\n"; nhap(a,n); cout<<"\n\nKiem tra Matranx\n\n_____________________________________\n\n"; kiemtra(a,n); }