Skip to content

Instantly share code, notes, and snippets.

@jhonylucas74
Last active August 29, 2015 14:13
Show Gist options
  • Save jhonylucas74/421d828ec0334a1ea140 to your computer and use it in GitHub Desktop.
Save jhonylucas74/421d828ec0334a1ea140 to your computer and use it in GitHub Desktop.
void ordemC(noLista *ini, int tam){
int i, j;
noLista *aux= ini;
noLista *aux2 =ini;
int tmp;
for(i= 1; i<= tamanho; i++){
aux2 = aux;
for( j = i ; j < tamanho ; j++ ){
if(aux->nota > aux2->nota){
tmp = aux->nota;
aux->nota = aux2->nota;
aux2->nota = tmp;
}
aux2 = aux2->prox;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment