I don't mean "iostream.h" or missng "return 0;". I wonder why don't run like it should but shows "press eny key continue"?
#include <iostream.h>
int n,m,result,br=0;
int a[100][100];
int jj=0;
void main() {
cout<<"n?"; cin>>n;
cout<<"m?"; cin>>m;
for(int i=0;i<n;i++)
for(int j=0;j<m;j++) {
cout<<"a["<<i<<"]["<<j<<"]=";
cin>>a[i][j]; }
for(int ii=0;ii<n;ii++)
for(int jj=0;jj<m;jj++) {
if(a[ii][jj]==a[ii++][jj++]) br++; result=a[ii][jj]; }
if(br>2) {
cout<<result; }
}