Răspuns:
using namespace std;
#include <iostream>
int main(){
int mat[50][50];
int i,j,maxc,l,c;
cout<<"Linii ?";cin>>l;
cout<<"Coloane ?";cin>>c;
for(i=0;i<l;i++)
for(j=0;j<c;j++) {
cout<<"mat["<<i<<j<<"]=";
cin>>mat[i][j];
}
cout<<"\n";
//afisare matrice
for(i=0;i<l;i++){
for(j=0;j<c;j++)
cout<<mat[i][j]<<" ";
cout<<"\n";
}
cout<<"\n";
maxc=0;
for(j=0;j<c;j++){
for(i=0;i<l;i++)
if (maxc<mat[i][j])
maxc=mat[i][j];
cout<<"Coloana "<<j<<" max "<<maxc<<"\n";
maxc=0;
}
}