//OrganizarVetor
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main(){
int i, j, valor = 0, vetor[3000];
clock_t begin = clock(), end;
srand( (unsigned) time(NULL) );
for (i = 0; i < 3000; i++){
vetor[i] = rand();
}
for (i = 0; i <= 2998; i++){
for (j = i+1; j <= 2999; j++){
if (vetor[i] > vetor[j]){
valor = vetor[i];
vetor[i] = vetor[j];
vetor[j] = valor;
}
}
}
for (i = 0; i < 3000; i++){
printf("%d ", vetor[i]);
}
end = clock();
printf("\nTempo Percorrido: %g\n", double(end - begin) / CLOCKS_PER_SEC);
getchar();
return 0;
}