17
This commit is contained in:
		
							parent
							
								
									cf749692f3
								
							
						
					
					
						commit
						23e483860e
					
				| @ -56,9 +56,9 @@ void run_expert_system(Node *node) { | ||||
|             return; | ||||
|         } | ||||
| 
 | ||||
|         // Выводим приглашение для ответа перед вопросом, как в ожидаемом выводе
 | ||||
|         // Выводим приглашение для ответа
 | ||||
|         printf("Odpovedajte 'a' pre prvu moznost alebo 'n' pre druhu moznost.\n"); | ||||
|          | ||||
| 
 | ||||
|         // Выводим текущий вопрос
 | ||||
|         printf("%s\n", node->text); | ||||
| 
 | ||||
| @ -79,10 +79,16 @@ void run_expert_system(Node *node) { | ||||
|             printf("Koniec\n"); | ||||
|             return; | ||||
|         } | ||||
| 
 | ||||
|         // Проверяем, достигли ли мы листа после перехода
 | ||||
|         if (node && !node->yes && !node->no) { | ||||
|             printf("*%s\n", node->text); | ||||
|             printf("Koniec\n"); | ||||
|             return; | ||||
|         } | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| void free_tree(Node *node) { | ||||
|     if (node) { | ||||
|         free_tree(node->yes); | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user