diff --git a/cv7/main b/cv7/main new file mode 100755 index 0000000..5baab3b Binary files /dev/null and b/cv7/main differ diff --git a/cv7/program.c b/cv7/program.c index b3e0900..cbda220 100644 --- a/cv7/program.c +++ b/cv7/program.c @@ -63,3 +63,21 @@ void count_items(struct tree* tree, int* count){ } } +int main() { + printf("Nacitanie baze pravidiel:\n"); + struct tree* root = load_tree(); + + if (!root) { + printf("Chyba: Nepodarilo sa nacitat bazu pravidiel.\n"); + return 1; + } + + int count = 0; + count_items(root, &count); + printf("Pozna %d druhov ovocia a zeleniny.\n", count); + printf("Strom pre ladenie:\n"); + print_tree(root, 0); + + destroy_tree(root); + return 0; +}