View Code of Problem 85

#include<stdio.h>
int main()
{
	int m, n;
	while (scanf("%d %d",&m.&n)!=EOF)
	{
		int a[100][100];
		for (int i = 0; i < m; i++)
		{
			for (int j = 0; j < n; j++)
			{
				scanf("%d", &a[i][j]);
			}
		}
		int x = 0, y = 0;
		for (int i = 0; i < m; i++)
		{
			for (int j = 0; j < n; j++)
			{
				if (a[i][j] < a[y][j]) y = i;
				if (a[i][j] > a[i][x]) x = j;
			}
		}
		printf("%d %d", x + 1, y + 1);
	}
	return 0;
}
/*
Main.c: In function 'main':
Main.c:5:26: error: expected identifier before '&' token
  while (scanf("%d %d",&m.&n)!=EOF)
                          ^
*/

Double click to view unformatted code.


Back to problem 85