TwoHighest reads the number of students n (at least 2), then n lines name score (scores from 0 to 100). It prints the student with the highest score, the student with the second-highest score, the lowest score and the average.
Keep only a few variables that you update inside the loop — no array, no Math.max: the point of the lab is the loop with if. If two students have the same score, the one read first stays ahead. For the input
5
Amina 78
Bo 91
Chen 85
Diallo 91
Eva 60
the program prints
Highest: Bo (91)
Second: Diallo (91)
Lowest score: 60
Average: 81.00