/*
The following program declares a two-dimensional array of 7 rows and 2 
columns. Each row of the array represents a SSN of a student (of type int, 
which means no space and no dashes are allowed in the SSN). Then it reads 
the array and finds the heighest grade and everyone who got the heighest 
grade. 
*/
#include <iostream>
using namespace std;
int main()
{
	float a[7][2], max;
	int i, j;
	cout << "Enter the array: \n";
	for (i = 0; i < 7; i++)
		for (j = 0; j < 2; j++)
			cin >> a[i][j];

	// Find the heigest grade	
	max = a[0][1];
	for (i = 0; i < 7; i++)
		if (a[i][1] > max)
			max = a[i][1];

	cout << "The heighest grade is: " << max << endl;
	cout << "the following students got that grade: \n";
	// Find all students who got the heighest grade
	for (i = 0; i < 7; i++)
		if (a[i][1] == max)
			cout << a[i][0] << endl;
	
	return 0;
}

