diff --git a/du5/program.c b/du5/program.c index 170b068..cf02ca8 100644 --- a/du5/program.c +++ b/du5/program.c @@ -116,15 +116,15 @@ int main() strcpy(lines[lineCount], buffer); lineCount += 1; } + + //zisk. korena + int root = buildATree(); - if (answerCount == 0) + if (root == -1) { printf("Koniec vstupu.\n"); return 0; } - - //zisk. korena - int root = buildATree(); printf("Expert z bufetu to vie.\n"); printf("Pozna %d druhov ovocia a zeleniny.\n", answerCount);