//Ex5_10.cpp
#include "iostream" 
using namespace std;
void maxmin(int x[][4],int m,int n,int &max,int &min) 
{int i,j; 
 max=x[0][0];min=x[0][0]; 
 for(i=0;i<m;i++) 
	for(j=0;j<n;j++) 
	{if(x[i][j]>max)max=x[i][j]; 
	 if(x[i][j]<min)min=x[i][j]; 
	} 
} 
void main() 
{int max,min,a[3][4]={{9,2,3,-4},{4,6,7,8},{3,12,0,1}}; 
 maxmin(a,3,4,max,min); 
 cout<<"max="<<max<<",min="<<min<<endl; 
}
