diff --git a/Arquivos/Estruturas.h b/Arquivos/Estruturas.h index 6ac3e15948f8d44dc7a04633e00e05354aede926..76e7186b6019f5522d411227dc596066028014d2 100644 --- a/Arquivos/Estruturas.h +++ b/Arquivos/Estruturas.h @@ -4,5 +4,5 @@ #include <stdlib.h> #include <stdbool.h> #include <sys/time.h> -#define TAM 10 //tamanho do vetor -#define NUMMAX 5 //constante que tem o máximo de valores +#define TAM 20 //tamanho do vetor +#define NUMMAX 50 //constante que tem o máximo de valores diff --git a/Arquivos/Loteria b/Arquivos/Loteria index 6f3be512a0e027261422176357cf6e6f01e7ac94..c44e47857b1274600c8c210159a22cf60ff2d6c1 100755 Binary files a/Arquivos/Loteria and b/Arquivos/Loteria differ diff --git a/Arquivos/Main.c b/Arquivos/Main.c index dc9e2743b553f83549dd54af8b25d9586bf4cf1c..37a98f6963f292e616981ae84dd03248687ffe96 100644 --- a/Arquivos/Main.c +++ b/Arquivos/Main.c @@ -5,11 +5,12 @@ int main () { int Vetor[TAM], Escolhidos[4]; int comando, Ordena; - + for (;;) { printf ("1 - Jogar\n2 - Comparar Algortimos\n"); scanf ("%d", &comando); switch (comando) { case 1: + printf ("Digite 4 Valores de 1 a 50\n"); LerDados (Escolhidos); GeraVetor (Vetor); //Sorteia o Algoritmo para Ordenar o Vetor @@ -50,4 +51,5 @@ int main () { TempoQuickSortRecursivo (Vetor); TempoQuickSortIterativo (Vetor); } + } } diff --git a/Arquivos/Vetor.c b/Arquivos/Vetor.c index 365ff3952bbf04efd07c0c177ac4566e288d3744..ff965fe042adc071fa55070d2adb903a53159c55 100644 --- a/Arquivos/Vetor.c +++ b/Arquivos/Vetor.c @@ -15,7 +15,7 @@ void GeraVetor (int *Vetor) { srand (time(NULL)); for (i=0; i < TAM; i++) - Vetor[i] = rand () % NUMMAX; + Vetor[i] = (rand () % NUMMAX) + 1; } //Função que imprime o vetor