Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. //el mayor problema no imprime como corresponde, a
  2. veces ok, pero otras mal, no encuentro el error
  3. }for(int i = 0; i < alumnos.length; i++){
  4. if(notas[i][7] > mayor){
  5. mayor = notas[i][7];
  6. mejor = i;
  7. System.out.print(String.format(" Nota mayor: %.1f
  8. ",mayor)); {
  9. System.out.println("Mejor: " + alumnos[i]);
  10. }
  11. }
  12. }
  13.  
  14. run:
  15. Notas alumno: Diego [2.9][1.4][4.3][3.7][2.4][1.1][4.8] Nota final -->
  16. 3,1
  17. Notas alumno: Martina [3.0][1.5][3.3][6.9][1.5][2.0][4.0] Nota final --
  18. > 3,0
  19. Notas alumno: Monse [6.9][2.2][4.3][6.1][6.7][2.0][5.1] Nota final -->
  20. 4,6
  21. Notas alumno: Gustavo [2.5][3.8][1.2][2.9][3.2][2.2][7.0] Nota final --
  22. > 4,4
  23. Nota mayor: 3,1 Mejor: Diego
  24. Nota mayor: 4,6 Mejor: Monse
  25. Promedio general del curso : 3,8 Ingrese un nombre para buscar:
  26.  
  27. Nota mayor: 4,6 Mejor: Monse
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement