#include #include #define n 8 void mergeSort(int *vet, int ini, int fim); void merge(int *vet, int ini, int fim, int meio); int main() { int i, vetor[n]; for (i=0; i vet[j] && j != fim+1)) { aux[k] = vet[j]; j++; k++; } else { aux[k] = vet[i]; i++; k++; } } for (i=ini; i<=fim; i++) { vet[i] = aux[i-ini]; } }