diff --git a/cv7/program.c b/cv7/program.c index 11321bb..beb9db9 100644 --- a/cv7/program.c +++ b/cv7/program.c @@ -50,15 +50,15 @@ int count_items(Node *node) { void ask_question(Node *node) { if (node == NULL) return; - printf("%s", node->text); - if (node->text[0] == '*') { - printf("Koniec\n"); + printf("Expert z bufetu to vie.\n"); return; } - char answer; printf("Odpovedajte 'a' pre prvu moznost alebo 'n' pre druhu moznost.\n"); + printf("%s", node->text); + + char answer; if (scanf(" %c", &answer) != 1) { printf("Neplatny vstup.\n"); return; @@ -86,6 +86,7 @@ int main() { ask_question(root); + printf("Koniec\n"); // Завершаем программу после вопроса free_tree(root); return 0; }