From 382ffe54c18b71dd95bd2fbb7272d8c6529581fa Mon Sep 17 00:00:00 2001 From: Yevhen Kozirovskyi Date: Thu, 14 Nov 2024 20:48:28 +0000 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20cv7/program.c?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cv7/program.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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; }