Aktualizovat du6/program.c

This commit is contained in:
Mykola Syniavskyi 2025-11-20 20:06:37 +00:00
parent a60719b45d
commit 98100eaafc

View File

@ -71,15 +71,14 @@ int count_leaves(struct tree* node) {
void run_system(struct tree* node) { void run_system(struct tree* node) {
printf("Odpovedajte 'a' pre prvu moznost alebo 'n' pre druhu moznost.\n");
while (node) { while (node) {
printf("Odpovedajte 'a' pre prvu moznost alebo 'n' pre druhu moznost.\n");
printf("%s\n", node->value); //виводимо питання чи відповідь printf("%s\n", node->value); //виводимо питання чи відповідь
if (!node->left && !node->right) { if (!node->left && !node->right) {
printf("Koniec\n"); printf("Koniec\n");
return; return;
} }
char c; char c;
if (scanf(" %c", &c) != 1) { if (scanf(" %c", &c) != 1) {