Răspuns:
{
unsigned int n,m,i,j,mx;
cout<<"n=";
cin>>n;
cout<<"m=";
cin>>m;
int a[n][m];
for(i=0;i<n;i++)
for(j=0;j<m;j++)
{
cout<<"a["<<i<<"]["<<j<<"]=";
cin>>a[i][j];
}
mx=a[0][0];
for(i=0;i<n;i++)
for(j=0;j<m;j++)
{
if(a[i][j]>mx)
mx=a[i][j];
}
cout<<mx;
return 0;
}
Explicație: