The elements of chair points fulfill one of these conditions:
#include <stdio.h>
#define N 10
typedef struct
{
int fils, cols;
unsigned int mat[N][N];
}tmatriz;
int main()
{
tmatriz m1={4,3,{{4,4,1},{4,3,0},{3,5,0}, {4,2,0}}};
int i, j;
int maxFils [m1.fils] = {-999, -999, -999, -999};
int minCols [m1.cols] = {999, 999, 999};
printf("Datos de la matriz m1:\n");
for (i=0; i<m1.fils; i++)
{
for (j=0; j<m1.cols; j++)
printf("%3u ", m1.mat[i][j]);
printf("\n");
}
for (i=0; i<m1.fils; i++){
for (j=0; j<m1.cols; j++){
if (m1.mat [i] [j] > maxFils [i]){
maxFils [i] = m1.mat [i] [j];
}
if (m1.mat [i] [j] < minCols [j]){
minCols [j] = m1.mat [i] [j];
}
}
}
for (i=0; i<m1.fils; i++){
for (j=0; j<m1.cols; j++){
if (maxFils [i] == minCols [j]){
printf ("Punto de silla en (%d, %d) y su valor es %d\n", i, j, m1.mat [i] [j]);
}
}
}
}
I do not understand why this algorithm does not work for me