Home › Forums › Decaffeinated Coffee › Java Problem › Reply To: Java Problem
January 26, 2012 5:33 pm at 5:33 pm
#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);