Start collecting inputs:
#include <stdio.h>
#include <stdlib.h>
#define N 10
int main()
{
int m[N][N];
int n,r,c;
printf("please enter the number of the rows\n");
if ( scanf("%d",&n) != 1 || n < 1 || n > N )
{
exit(-1); }
for (r = 0; r < n; ++r)
for (c = 0; c < n; ++c)
{
printf("please enter item[%d][%d]\n", r,c);
if ( scanf("%d", &m[r][c] ) != 1)
{
exit(-1); }
}
for (r = 0; r < n; ++r)
{
for (c = 0; c < n; ++c)
printf("%5d", m[r][c]);
printf("\n");
}
}
Please note, you don't need arrays to store the candidates to your final result. Just store current minimum of current row and the current maximum (of the minima).