Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- talumno maximaNota(tasignatura a)
- {
- nodo *aux=a.primero;
- float nota_maxima=nota(a.primero->dato); //Tomamos como nota maxima la del primer alumno
- talumno alumno=aux->dato;
- while(aux->sig!=NULL)
- {
- if (nota(aux->dato)>nota_maxima)
- {
- nota_maxima=nota(aux->dato);
- alumno=aux->dato;
- }
- aux=aux->sig;
- }
- //Comprobamos el ultimo
- if (nota(aux->dato)>nota_maxima)
- {
- nota_maxima=nota(aux->dato);
- alumno=aux->dato;
- }
- return alumno;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement