Answer:
Hi!
var int n = 0; // Initialize the variable n;
stdin = new Scanner(System.in); // Instanciate the Scanner object.
n = stdin.nextInt(); // It saves the first input before goes on the while loop.
while( (n<1) && (n>10) ) {
n = stdin.nextInt(); // Keeps looping until a number between 1 and 10 (inclusive) has been entered.
}