Help with filling an array

There is my problem:

In the sport of diving, seven judges award a score between 0 and 10, where each score may be a floating point value. The highest and lowest scores are thrown out and the remaining scores are added together. The sum is then multiplied by the degree of difficulty for that dive. The degree of difficulty ranges from 1.2 to 3.8 points. The total is then multiplied by 0.6 to determine the diver's score.

Write a computer program that inputs a degree of difficulty and seven judges' scores and outputs the overall score for that dive. The program should ensure that all inputs are within the allowable data ranges.

Below is my code:

Code:

`import java.util.Arrays;`

import java.util.Scanner;

public class DivingScores

{

public static void main(String[] args)

{

Scanner keyboard = new Scanner(System.in);

double[] scores = new double[7];

double max;

double sum = 0;

double difficulty;

double finalscore;

int index;

System.out.println("Enter " + scores.length + " scores.");

scores[0] = keyboard.nextDouble();

max = scores[0];

for (index = 1; index < 7; index++);

{

scores[index] = keyboard.nextDouble();

if (scores[index] > max)

max = scores[index];

}

Arrays.sort(scores);

for(int i=0; i < scores.length ; i++)

{

sum = sum + scores[i];

}

System.out.println("Enter degree of difficulty");

difficulty = keyboard.nextDouble();

double S0 = scores[0];

double S1 = scores[1];

double S2 = scores[2];

double S3 = scores[3];

double S4 = scores[4];

double S5 = scores[5];

double S6 = scores[6];

finalscore = ((((sum - scores[0]) - scores[6]) * difficulty) * 0.6);

System.out.println("final score of diver is " + finalscore);

}

}

I know I should have used methods, but I am supposed to do this problem without. When I compile the code I have no errors, when I run the code, I get the runtime error:

Enter 7 scores.

1 2 3 4 5 6 7

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 7

at DivingScores.main(DivingScores.java:30)

Process completed.

Any help of why there is an error will be appreciated.

Thanks.