Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void altaAlumno(String queAlumno, int queNota)
- {
- if (numAlumnos >= MAX)
- return;
- if (queNota > 10)
- queNota = 10;
- else if (queNota <= 0)
- queNota = 1;
- nombres[numAlumnos] = queAlumno;
- int posmin;
- String aux = "";
- for (int i = 0; i < numAlumnos - 1; i++)
- {
- posmin = i;
- for (int j = i + 1; j < numAlumnos; j++)
- if (nombres[j].compareToIgnoreCase(nombres[posmin]) < 0)
- posmin = j;
- aux = nombres[posmin];
- nombres[posmin] = nombres[i];
- nombres[i] = aux;
- notas[i] = queNota;
- }
- numAlumnos++;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement