nihonium
/
mipt_clang
Archived
1
0
Fork 0
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

31 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;
}