Обновить cv7/program.c

This commit is contained in:
Yevhen Kozirovskyi 2024-11-15 04:06:10 +00:00
parent 6a92936960
commit e4c2ad52d2

View File

@ -55,11 +55,10 @@ void ask_question(Node *node) {
} }
printf("Odpovedajte 'a' pre prvu moznost alebo 'n' pre druhu moznost.\n"); printf("Odpovedajte 'a' pre prvu moznost alebo 'n' pre druhu moznost.\n");
printf("%s", node->text); printf("%s", node->text);
char answer; char answer;
if (scanf(" %c", &answer) != 1) { if (scanf(" %c", &answer) != 1) {
printf("Neplatny vstup.\n"); printf("Nerozumiem\n");
return; return;
} }
@ -68,7 +67,7 @@ void ask_question(Node *node) {
} else if (answer == 'n') { } else if (answer == 'n') {
ask_question(node->no); ask_question(node->no);
} else { } else {
printf("Neplatny vstup.\n"); printf("Nerozumiem\n");
} }
} }