Update cv7/program.c
This commit is contained in:
parent
39fde4afb0
commit
6d8fbb2e83
@ -4,7 +4,6 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
||||||
#define SIZE 200
|
#define SIZE 200
|
||||||
|
|
||||||
struct tree
|
struct tree
|
||||||
@ -65,6 +64,7 @@ int main(void)
|
|||||||
struct tree *tr;
|
struct tree *tr;
|
||||||
|
|
||||||
tr=read_tree();
|
tr=read_tree();
|
||||||
|
char t;
|
||||||
|
|
||||||
printf("Expert z bufetu to vie.\n");
|
printf("Expert z bufetu to vie.\n");
|
||||||
printf("Pozna 2 druhov ovocia a zeleniny.\n");
|
printf("Pozna 2 druhov ovocia a zeleniny.\n");
|
||||||
@ -76,20 +76,19 @@ int main(void)
|
|||||||
if(p->value[0]=='*')
|
if(p->value[0]=='*')
|
||||||
break;
|
break;
|
||||||
printf("Odpovedajte 'a' pre prvu moznost alebo 'n' pre druhu moznost.\n");
|
printf("Odpovedajte 'a' pre prvu moznost alebo 'n' pre druhu moznost.\n");
|
||||||
char t=fgetc(stdin);
|
do
|
||||||
|
{
|
||||||
|
t=fgetc(stdin);
|
||||||
if(t=='a')
|
if(t=='a')
|
||||||
p=p->left;
|
{p=p->left; break;}
|
||||||
if(t=='n')
|
if(t=='n')
|
||||||
p=p->right;
|
{p=p->right; break;}
|
||||||
|
}while(1);
|
||||||
|
|
||||||
}while(1);
|
}while(1);
|
||||||
|
|
||||||
|
|
||||||
|
printf("Koniec\n");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
printf("Koniec");
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user