I have to create a program to calculate the average of each students' scores. I managed to do that but how can I limit the score to be only between 0 to 100? I've searched other questions and many shows to put while statement. The problem is that I don't know where to add the while. So here's the code:

```
import java.util.Scanner;

public class AverageScore {
public static void main(String[] args) {

    int x; // Number of students
    int y; // Number of tests per student
    int Score = 0; //Score of each test for each student
    double Average = 0; //Average score
    double Total = 0; //Total score

    Scanner keyboard = new Scanner(System.in);

    System.out.println("Please enter the number of students: ");
    x = keyboard.nextInt();

    System.out.println("Please enter the amount of test scores per student: ");
    y = keyboard.nextInt();

    for (int z = 0; z < x; z++)
    {           
    System.out.println("Student " + (z + 1));
    System.out.println("------------------------");

    for (int g=0; g < y; g++)
    {
        System.out.print("Please enter score " + (g + 1) + ":  ");

        Total += new Scanner(System.in).nextInt();
        Total += Score;
        Average = (Total/y);
    }       

    System.out.println("The average score for student " + (z + 1) + " is " + Average);
    System.out.println("                      ");

    Total= 0;
    }

    keyboard.close();
}
}

```

If there is any other ways please do state. Thanks in advance.