Archived
1
0
Fork 0
This repository has been archived on 2022-06-20. You can view files and clone it, but cannot push or open issues or pull requests.
mipt_clang/sort/main.c
nihonium eeffd774de nya
2022-02-04 20:51:37 +03:00

30 lines
523 B
C

#include <stdio.h>
#include <stdbool.h>
#include <time.h>
#include <stdlib.h>
#include "sorts.c"
#define ALEN 1000
#define DISPLEN 25
#define THRESHOLD 25
int main() {
srand(time(NULL));
int a[ALEN];
for (int i = 0; i < ALEN; a[i++] = rand() % (2 * ALEN));
printf("Before:\n");
for (int i = 0; i < DISPLEN; ++i) {
printf("%d ", a[i]);
}
putchar('\n');
//bubblesort(a, ALEN);
insertion(a, ALEN);
printf("After:\n");
for (int i = 0; i < DISPLEN; ++i) {
printf("%d ", a[i]);
}
putchar('\n');
return 0;
}