Написал 7е задание на быструю сортировку

This commit is contained in:
AZEN-SGG 2024-12-01 12:44:53 +03:00
parent c6539e2868
commit c33f7295d5
10 changed files with 280 additions and 22 deletions

View file

@ -3,27 +3,25 @@
#include "tools.h"
#include "stdlib.h"
int main(void) {
int main(void) {
FILE * file = getFile();
double * array;
double * orig_arr;
int length;
if (file == NULL) return -1;
array = getArray(file);
if (array == NULL) return -2;
length = (int)array[0] - 1;
orig_arr = array;
array = &array[1];
printArray(array, length);
sort(array, length);
printArray(array, length);
testSort(array, length, sort);
free(orig_arr);
printf("\n");
randomArray();
testSortRandomArray(sort);
return 0;
}