#include <stdio.h>
#include <stdlib.h>
#include <string.h>
char nota[100];
int notamax,notasegunda,f,i;
int main()
{
i=0;
while(nota[--i] != 'n'){
printf("Digite a nota do aluno(n para ver as notas):");
gets(nota);
colocarnota(nota[i]);
i++;
}
printf("Notas:%d,%d",notamax,notasegunda);
system("PAUSE");
}
int colocarnota(int notas){
for(f=0;f < strlen(nota);f++){
if(notamax < nota[f])
notamax = nota[f];
if(notasegunda < nota[f] && notamax > nota[f])
notasegunda = nota[f];
}
} acho que deve funcionar ^^