Initializacia

This commit is contained in:
Kozar 2024-11-10 15:55:33 +00:00
parent e94c43f798
commit 57556018ea

View File

@ -85,14 +85,14 @@ void count_items(struct tree* tree, int* count) {
int main() {
struct tree* root = load_tree();
printf("Expert z bufetu to vie.\n");
if (!root) {
printf("Chyba: Nepodarilo sa nacitat bazu pravidiel.\n");
printf("Chybna databaza\n");
return 0;
}
int count = 0;
count_items(root, &count);
printf("Expert z bufetu to vie.\n");
printf("Pozna %d druhov ovocia a zeleniny.\n", count);
printf("Odpovedajte 'a' pre prvu moznost alebo 'n' pre druhu moznost.\n");