Обновить cv7/program.c
This commit is contained in:
parent
f92d44baf3
commit
382ffe54c1
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user