Someone can help me here.
I did a 3-note check within a while.
I need two notes to be the same as a Student1 and Student2 messages (Only display if the two notes are equal) Approved. I was able to do it with only the highest grade.
package calculo;
import java.util.Scanner;
public class Calculo {
public static void main(String[] args) {
float maior, num;
int count = 2;
Scanner entrada = new Scanner(System.in);
System.out.print("Nota Aluno 1: ");
num = entrada.nextFloat();
maior = num;
while(count <= 3){
System.out.print("Nota Aluno " + count + ": ");
num = entrada.nextFloat();
if(num > maior){
maior = num;
}
count++;
}
System.out.println("O maior numero digitado é: " + maior);
}
}