What I'm trying to do is to take 7 of the scores from judges and discard the lowest and the highest score then average five scores that remain after.
I got to where I can get all of the scores, but I have no idea how to take the lowest and highest score and discard them.
Please help me..
Thank you!
import acm.program.*;
public class Judges1 extends ConsoleProgram
{
public void run()
{
int numJudges = 7;
int highest = 0;
int lowest = 0;
double score[] = new double[numJudges];
double totScore = 0.0;
double avgScore = 0.0;
for (int i = 0; i < numJudges; i++)
{
score[i] = readDouble ("Enter Score: ");
totScore += score[i];
}
avgScore = totScore / numJudges;
println ("Average Score: " + avgScore);
}
}