aktivita 3

This commit is contained in:
Radovan Kofira 2020-11-24 20:18:19 +01:00
parent 751664869a
commit e148a5b9ea
2 changed files with 16 additions and 3 deletions

View File

@ -1,8 +1,21 @@
#include <stdio.h>
#include <stdlib.h>
#define MAX 20
int main() {
//int l = i * 2 + 1;
//int r = i * 2 + 2;
int i, t ,n;
int *a = calloc(MAX, sizeof(int));
int *m = calloc(MAX, sizeof(int));
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d", &a[i]);
}
//m = buildmaxheap(a, n);
printf("The heap is\n");
for (t = 0; t < n; t++) {
printf("%d\n", m[t]);
}
int i;
int l = i * 2 + 1;
int r = i * 2 + 2;
return 0;
}

Binary file not shown.