diff --git "a/Arquivos/Ordena\303\247\303\243o.c" "b/Arquivos/Ordena\303\247\303\243o.c" index 9e34a51a81c649123819cda3d647161c53e1a8aa..0b9fca8ee4c49f83a3b5f37507a1d7e781ded504 100644 --- "a/Arquivos/Ordena\303\247\303\243o.c" +++ "b/Arquivos/Ordena\303\247\303\243o.c" @@ -21,3 +21,19 @@ void SelectSort (int *Vetor) { Troca (Vetor, i, menor); } } + +void BubbleSort (int *Vetor) { + bool trocou; + int i; + + trocou = true; + while (trocou) { + trocou = false; + for (i=0; i < TAM; i++) { + if (Vetor[i] > Vetor[i+1]) { + Troca(Vetor,i,i+1); + trocou = true; + } + } + } +}