#include <iostream>
#include <math.h>
using namespace std;
int main()
{int a[50][50],i,j,n,m,mx,x,y;
cout<<"n= ";cin>>n;
cout<<"m= ";cin>>m;
for(i=1;i<=n;i++)
for(j=1;j<=m;j++)
{
cout<<"a["<<i<<"]["<<j<<"]=";
cin>>a[i][j];
}
for(i=1;i<=n;i++)
{
for(j=1;j<=m;j++)
cout<<a[i][j]<<" ";
cout<<endl;
}
mx=a[1][1];
for(i=1;i<=n;i++)
for(j=1;j<=m;j++)
{
if(a[i][j]>mx)
mx=a[i][j];
x=i;
y=j;
}
cout<<endl;
cout<<"Cel mai mare element din matrice este : "<<mx;
cout<<endl;
cout<<"Lininia: "<<x<<" "<<"Coloana : "<<y;
}
Poftim ! Sper sa te ajute! La mine a mers perfect! Mult succes la școală!