Aktualizovat du6/program.c
This commit is contained in:
parent
bf691cbf9a
commit
a60719b45d
@ -37,7 +37,7 @@ struct tree* read_tree(int* counter) {
|
||||
strcpy(node->value, buffer);
|
||||
node->id = (*counter)++;
|
||||
|
||||
// відповідь (*...), то це лист → не читаємо дітей
|
||||
//відповідь (*.), то це лист → не читаємо дітей
|
||||
if (buffer[0] == '*') {
|
||||
node->left = NULL;
|
||||
node->right = NULL;
|
||||
@ -73,7 +73,7 @@ int count_leaves(struct tree* node) {
|
||||
void run_system(struct tree* 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) {
|
||||
printf("Koniec\n");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user