diff --git a/a3/program.c b/a3/program.c index c408dda..9084db9 100644 --- a/a3/program.c +++ b/a3/program.c @@ -8,7 +8,9 @@ int main() { int *a = calloc(MAX, sizeof(int)); for (i = 0; i < MAX; i++) { scanf("%d", &a[i]); - n++; + if(a[i]!=0){ + n++; + } } //m = buildmaxheap(a, n); printf("Je to taka kopa:\n");