deathpain
devkemo
package goodquestion;import java.util.*;public class Goodquestion { public static void main(String[] args) { int highestscore=0, averagescore = 0, counter = 1; String higheststudentname = ""; Scanner input = new Scanner(System.in); System.out.print("enter the number of students: "); int studentscount = input.nextInt(); if(studentscount <= 0) System.exit(0); while(counter <= studentscount){ System.out.print("\nenter student " + counter + " name: "); String name = input.next(); System.out.print("\nenter student " + counter + " score: "); int score = input.nextInt(); if(score > highestscore){ highestscore = score; higheststudentname = name;} counter++;} System.out.println(higheststudentname+" has the highest score "+highestscore);}}