From ccbfa5c962e0bb3e327fad656094755acda532a7 Mon Sep 17 00:00:00 2001 From: Peter Petrek Date: Fri, 3 Dec 2021 00:42:58 +0100 Subject: [PATCH] fix --- a4/program.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/a4/program.c b/a4/program.c index b030f03..6204615 100644 --- a/a4/program.c +++ b/a4/program.c @@ -68,6 +68,7 @@ void vypisovac(int vypis[SIZE], int input[SIZE], int size){ if (counter>=count && i<=(size/2)) { count = ownPow(2,i)/2; + if (ownPow(2,i)%2){count++;} counter = 0; space++; } @@ -77,7 +78,6 @@ void vypisovac(int vypis[SIZE], int input[SIZE], int size){ { count = ownPow(2,i)/2; counter = 0; - space++; } else{ count = ownPow(2,size-i-1)/2;