diff --git a/du5/program.c b/du5/program.c index 22ac1c2..170b068 100644 --- a/du5/program.c +++ b/du5/program.c @@ -117,14 +117,14 @@ int main() lineCount += 1; } - //zisk. korena - int root = buildATree(); - - if (root == -1) + if (answerCount == 0) { 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);