Reference code:
# include & ltstdio.h & gt
# Definition? n? three
int? Master ()
{
int? a[n][n],I,j,max,maxi
for(I = 0; I & ltn;; I++)// Keyboard input?
for(j = 0; j & ltn; j++)
scanf("%d ",& ampa[I][j]); ?
max = a[0][0];
maxi = 0;
for(I = 1; I & ltn;; I++)// ergodic judgment?
if(max & lt; a[i][i])? {
max = a[I][I];
maxi = I;
}
Printf ("maximum value is %d, maximum number of rows is %d, \n", max, maxi);
Return? 0;
}
/*
1? 2? three
4? 6? five
7? 9? 2
The maximum value is 6 and the maximum number of rows is 1.
*/