It does not work directly for me, it does not print anything, I can not find the error. The statement of the program is as follows:
Given the grades and names of students in a course, print the names of students whose grade is greater than 7. The entry ends when a negative note is entered .
String nombre;
int nota = 0;
Scanner teclado = new Scanner (System.in);
while(nota<0) {
System.out.println("Ingrese nombre : ");
nombre = teclado.next();
System.out.println("Ingrese nota : ");
nota=teclado.nextInt();
if(nota>7) {
nota = teclado.nextInt();
System.out.println("Alumno con nota mayor a 7 : " +nombre );
}
}