Update cv7/program.c

This commit is contained in:
Yurii Yakovenko 2024-11-11 22:56:57 +00:00
parent 2d1862f3ca
commit f677e35a6a

View File

@ -81,15 +81,21 @@ void destroy_tree(struct tree* tree){
int main(void) int main(void)
{ {
struct tree *tr; struct tree *tr=NULL;
tr=read_tree(); tr=read_tree();
printf("Expert z bufetu to vie.\n");
if(tr==NULL)
{
printf("Chybna databaza\n");
return 0;
}
int kk; int kk;
char t; char t;
kk=kkk(tr,0); kk=kkk(tr,0);
printf("Expert z bufetu to vie.\n");
printf("Pozna %d druhov ovocia a zeleniny.\n", kk); printf("Pozna %d druhov ovocia a zeleniny.\n", kk);
struct tree *p=tr; struct tree *p=tr;
@ -134,3 +140,4 @@ int main(void)
} }