Răspuns:
#include <iostream>
using namespace std;
int main()
{
int n, a[20][20],i,j,maxim;
cout<<"n= "; cin>>n;
for(i=1;i<=n;i++)
for (j=1;j<=n;j++)
cin>>a[i][j];
maxim=a[2][1];
for(j=2;j<=n;j++)
if(a[2][j]>maxim) maxim=a[2][j];
cout<<"maxim= "<<maxim;
return 0;
}
Explicație: