#include "stdio.h"
int main(int argc,char *argv[]){
int a[4][5],i,j,mi,mj;
printf("Input some data(int:)...\n");
for(mi=i=0;i<4;i++)
for(mj=j=0;j<5;j++){
scanf("%d",a[i]+j);
if(a[i][j]>a[mi][mj])
mi=i,mj=j;
}
printf("\nThe MAX is %d, it is at i = %d, j=%d\n",a[mi][mj],mi,mj);
return 0;
}
运行样例: