0
Make a program that receives a series of student grades and then print them out. However, the program cannot accept notes greater than 100 or less than 0. If the user types a wrong note, they should be able to type again.
The code so far is like this:
public class notaMenorCem
{
public static void main (String[]args)
{
int notaAluno [] = new int[5];
for (int i=0; i<notaAluno.length; i++)
{
notaAluno[i] = Entrada.leiaInt ("Digite a nota: ");
{
if(notaAluno[i] <0 || notaAluno[i] >100)
{
System.out.println("Nota inválida, digite novamente:");
}
}
}
for (int i=0; i<notaAluno.length; i++)
{
System.out.println("Nota do aluno " +i+ ":"+notaAluno[i]);
}
}
}
The user receives the notice by entering a note greater than 100 but it is registered equal, what is missing?