Fix bugs #9

Merged
cromer merged 2 commits from fixprint into master 2018-11-11 20:16:41 -03:00
2 changed files with 5 additions and 5 deletions

View File

@ -63,7 +63,7 @@ void print_array(int *array, int n) {
for (i = 0; i < n; i++) {
fprintf(stdout, "%d ", array[i]);
}
fprintf(stdout, "\n");
fprintf(stdout, "\n\n");
}
/**
@ -105,7 +105,7 @@ int main (int argc, char **argv) {
return 0;
}
while ((opt = getopt_long(argc, argv, "mqbBcsn:ev", long_options, &long_index)) != -1) {
while ((opt = getopt_long(argc, argv, "mqbBcsn:eiv", long_options, &long_index)) != -1) {
switch (opt) {
case 'm':
if (algoritmo != -1) {
@ -189,12 +189,12 @@ int main (int argc, char **argv) {
array[i] = opt;
}
else {
array[i] = gen_rand(-1000, 5000);
array[i] = gen_rand((n * 10) * -1, n * 10);
}
}
if (imprimir) {
fprintf(stdout, "\nAntes:\n");
fprintf(stdout, "Antes:\n");
print_array(array, n);
}

View File

@ -81,7 +81,7 @@ int main(int argc, char **argv) {
// Prepare for sort tests
for (i = 0; i < n; i++) {
test_case[i] = gen_rand(-20, 100);
test_case[i] = gen_rand(-100, 100);
}
memcpy(qarray, test_case, sizeof(int) * n);
memcpy(test_array, test_case, sizeof(int) * n);