package java_1;
import java.util.Scanner;
public class Exercises_2{
public static void main(String[] args) {
Scanner input = new Scanner (System.in);
try{
String name,hight="";
int score,i,b,max=0;
System.out.print("Please input how much the studnets :");
b = input.nextInt();
System.out.printf("Please input the %d student`s name and"
+ " score\n",b);
System.out.print("name\tscore\n");
for(i=0;i<b;i++)
{
name = input.next();
score = input.nextInt();
if(max<score)
{
// hight="";
hight=name+" "+score;
max=score;
}
}
System.out.print("The highest score and studnet`s name is "+hight);
}
finally {
input.close();
}
}
}