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;