Update cv7/program.c

This commit is contained in:
Yurii Yakovenko 2024-11-11 21:49:57 +00:00
parent 155f61e5e8
commit 39fde4afb0

View File

@ -29,7 +29,6 @@ struct tree* read_tree()
node->left=NULL; node->left=NULL;
node->right=NULL; node->right=NULL;
@ -67,8 +66,8 @@ int main(void)
tr=read_tree(); tr=read_tree();
printf("\nExpert z bufetu to vie."); printf("Expert z bufetu to vie.\n");
printf("\nPozna 2 druhov ovocia a zeleniny."); printf("Pozna 2 druhov ovocia a zeleniny.\n");
struct tree *p=tr; struct tree *p=tr;
do do
@ -76,7 +75,7 @@ int main(void)
printf("%s",p->value); printf("%s",p->value);
if(p->value[0]=='*') if(p->value[0]=='*')
break; break;
printf("\nOdpovedajte 'a' pre prvu moznost alebo 'n' pre druhu moznost."); printf("Odpovedajte 'a' pre prvu moznost alebo 'n' pre druhu moznost.\n");
char t=fgetc(stdin); char t=fgetc(stdin);
if(t=='a') if(t=='a')
p=p->left; p=p->left;