第1个回答 2016-01-02
int main(){
int m=0, n=0,arr[100][100],x1=0,y1=0;
scanf_s("%d%d",&m,&n);
for (int i = 0; i < m; i++)
{
for (int j = 0; j < n; j++)
{
scanf_s("%d", &arr[i][j]);
}
}
for (int i = 0; i < m; i++)
{
for (int j = 0; j < n; j++)
{
if (arr[i][j]>arr[x1][y1]){
x1 = i;
y1 = j;
}
}
}
printf_s("max=%d\nrow=%d,column=%d\n",arr[x1][y1],x1+1,y1+1);
system("pause");
return 0;
}
这里print_s你可以在VC60里面改成print