Initializacia

This commit is contained in:
Kozar 2024-11-10 15:12:57 +00:00
parent 13efda128e
commit 00d8213551

View File

@ -64,9 +64,7 @@ void count_items(struct tree* tree, int* count){
} }
int main() { int main() {
printf("Nacitanie baze pravidiel:\n");
struct tree* root = load_tree(); struct tree* root = load_tree();
if (!root) { if (!root) {
printf("Chyba: Nepodarilo sa nacitat bazu pravidiel.\n"); printf("Chyba: Nepodarilo sa nacitat bazu pravidiel.\n");
return 1; return 1;
@ -75,8 +73,9 @@ int main() {
int count = 0; int count = 0;
count_items(root, &count); count_items(root, &count);
printf("Pozna %d druhov ovocia a zeleniny.\n", count); printf("Pozna %d druhov ovocia a zeleniny.\n", count);
printf("Strom pre ladenie:\n"); printf("Odpovedajte 'a' pre prvu moznost alebo 'n' pre druhu moznost.\n");
print_tree(root, 0);
run_tree(root);
destroy_tree(root); destroy_tree(root);
return 0; return 0;