Reply To: Java Problem

Home Forums Decaffeinated Coffee Java Problem Reply To: Java Problem

#846534
2qwerty
Participant

I was joking about the island i wanted to see how many people heard of it before. Anyway your answer should be something like this:

//in the begining add

int max=0;

int highestPlayer;

//then right after you know playerAverage do this

if(playerAverage>max)

{

max = playerAverage;

highestPlayer=x;

}

//right before writting out team average add this

System.out.println(“Player with the highest average: ” + highestPlayer);