public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.print("Introduzca el nombr del alumno: ");
String nombre = sc.nextLine();
int[] calificaciones = new int[10];
int mayores6 = 0;
int menores5 = 0;
double total = 0;
for (int i = 0; i < calificaciones.length; i++) {
System.out.print("Introduzca la calificacion " + (i + 1) + ": ");
calificaciones[i] = Integer.parseInt(sc.nextLine());
total += calificaciones[i];
if (calificaciones[i] < 6) {
menores5++;
} else {
mayores6++;
}
}
String promedio = String.format("%.2f", (total / calificaciones.length));
System.out.println("Nombre del alumno: " + nombre
+ "\nCantidad de calificaciones mayores o iguales a 6: " + mayores6
+ "\nCantidad de calificaciones menores o iguales a 5: " + menores5
+ "\nPromedio: " + promedio
);
}