#include <stdio.h>
#define MAXSIZE 100
int
search2d (int array[][MAXSIZE], int value, int size, int *foundcol)
{
int i, j, foundrow;
foundrow = -1;
for (i=0; i<size; ++i)
for (j=0; j<size; ++j)
{
if (array[i][j] == value)
{
foundrow = i; /* I have found it! */
*foundcol = j;
}
}
return (foundrow);
}
int
main (void)
{
int x[100][100], value, row, col, size, i, j;
value = 99;
scanf ("%d", &size);
for (i=0; i<size; ++i)
for (j=0; j<size; ++j)
scanf ("%d", &x[i][j]);
row = search2d (x, value, size, &col);
if (row >= 0)
printf ("%d found at row %d / column %d.\n", value, row, col);
else
printf ("%d not found in the array.\n", value);
return (0);
}