繁华开满天机
#include<iostream.h>int max=0,may=0;int array[5][5];void ReMax(){int i,j;///冒泡法,时间复杂度为5*5for(i=0;i<5;i++)for(j=0;j<5;j++)if(array[max][may]<array[i][j+1]){max=i;may=j+1;}}void main(){int i,j;//*a=(int*)malloc(5*sizeof(int));cout<<"请输入一个数组array[5][5]:"<<endl;for(i=0;i<5;i++)for(j=0;j<5;j++)cin>>array[i][j];ReMax();cout<<"最大值坐标:"<<max<<","<<may<<endl;}