From e7574f64e97b803158cdcbd73a1a69ef32cac24c Mon Sep 17 00:00:00 2001 From: Deinerovych Date: Wed, 6 Nov 2024 10:09:19 +0100 Subject: [PATCH] 7 --- cv7/program.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cv7/program.c b/cv7/program.c index 006e273..eb7ba1e 100644 --- a/cv7/program.c +++ b/cv7/program.c @@ -48,9 +48,10 @@ int count_products(Node *node) { } void run_expert_system(Node *node) { + printf("Expert z bufetu to vie.\n"); + while (node) { if (!node->yes && !node->no) { - printf("Expert z bufetu to vie.\n"); printf("*%s\n", node->text); printf("Koniec\n"); return; @@ -84,7 +85,7 @@ void create_default_knowledge_base() { perror("Failed to create the knowledge base file"); exit(1); } - fprintf(file, "Je to ovocie alebo zelenina?\n"); + fprintf(file, "Je to ovocie alebo zelenina\n"); fprintf(file, "*Jablko\n"); fprintf(file, "*Mrkva\n"); fclose(file);