From 9df06406d800d19d9e197006aff4b41575f2667f Mon Sep 17 00:00:00 2001 From: Radovan Kofira Date: Tue, 24 Nov 2020 20:59:33 +0100 Subject: [PATCH] a3 --- a3/program.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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");