diff --git a/a3/program.c b/a3/program.c index 498a218..03455cd 100644 --- a/a3/program.c +++ b/a3/program.c @@ -1,8 +1,21 @@ #include +#include +#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; } \ No newline at end of file diff --git a/a3/program.exe b/a3/program.exe deleted file mode 100644 index 9b8390d..0000000 Binary files a/a3/program.exe and /dev/null differ