Sunteți pe pagina 1din 1

#include <iostream.

h>
#include <conio.h>
void main (void){
clrscr();
int a[100][100],n,m,i,j,max;
cout<<"numarul de linii este "; cin>>m;
cout<<"numarul de coloane este "; cin>>n;
for (i=0;i<m;i++)
for (j=0;j<n;j++){
cout<<"a["<<i<<"]["<<j<<"]=";
cin>>a[i][j];
}
max=a[0][0];
for (i=0;i<m;i++)
for (j=0;j<n;j++)
if (max<a[i][j]) max=a[i][j];
cout<<"maximul este "<<max;
getch();
}