Update cv7/program.c

This commit is contained in:
Yurii Yakovenko 2024-11-11 22:03:00 +00:00
parent 67de6c8629
commit cba7e62977

View File

@ -4,7 +4,6 @@
#include <assert.h>
#include <string.h>
#define SIZE 200
struct tree
@ -12,7 +11,6 @@ struct tree
char value[SIZE];
struct tree *left, *right;
};
@ -26,9 +24,6 @@ struct tree* read_tree()
struct tree* node = (struct tree*)calloc(1,sizeof(struct tree));
memcpy(node->value,buffer,SIZE);
node->left=NULL;
node->right=NULL;
@ -71,9 +66,9 @@ int main(void)
printf("Pozna 2 druhov ovocia a zeleniny.\n");
struct tree *p=tr;
printf("Odpovedajte 'a' pre prvu moznost alebo 'n' pre druhu moznost.\n");
do
{
printf("Odpovedajte 'a' pre prvu moznost alebo 'n' pre druhu moznost.\n");
printf("%s",p->value);
if(p->value[0]=='*')
break;
@ -87,10 +82,11 @@ int main(void)
}while(1);
}while(1);
printf("Koniec\n");
return 0;
}