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

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

View File

@ -56,10 +56,9 @@ void ask_question(Node *node) {
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");
printf("Nerozumiem\n");
return;
}
@ -68,7 +67,7 @@ void ask_question(Node *node) {
} else if (answer == 'n') {
ask_question(node->no);
} else {
printf("Neplatny vstup.\n");
printf("Nerozumiem\n");
}
}