No unique max.
int find_max(int b[N][N]) { nt max = b[0][0]; int x,y; int counter=0; int a=0,v=0,c=0; for (x = 0; x < N; x++) { for (y = 0; y < N; y++) { if (max < b[x][y]) { max = b[x][y]; a=x; v=y; } } } c=((a*10)+v); for (x = 0; x < N; x++) { for (y = 0; y < N; y++) { if((b[x][y]) == max); counter++; } } if(counter>1) printf("no uniqe max"); else return c; }
max
counter
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)