buffet
This commit is contained in:
parent
3e416f3804
commit
e3a7bb990a
@ -45,6 +45,7 @@ void search(struct tree* this){
|
|||||||
printf("Koniec vstupu\n");
|
printf("Koniec vstupu\n");
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
if(buffer[0] != '\n'){
|
||||||
if(buffer[0] == 'a'){
|
if(buffer[0] == 'a'){
|
||||||
if(this->left->value[0] == '*'){
|
if(this->left->value[0] == '*'){
|
||||||
printf("%s\n", this->left->value);
|
printf("%s\n", this->left->value);
|
||||||
@ -66,7 +67,8 @@ void search(struct tree* this){
|
|||||||
search(this->right);
|
search(this->right);
|
||||||
|
|
||||||
}
|
}
|
||||||
else if(buffer[0] != 'a' || buffer[0] != 'n'){
|
}
|
||||||
|
else{
|
||||||
printf("Nerozumiem\n");
|
printf("Nerozumiem\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -125,10 +127,11 @@ int count_all(struct tree* node){
|
|||||||
|
|
||||||
int main(){
|
int main(){
|
||||||
struct tree* tree = NULL;
|
struct tree* tree = NULL;
|
||||||
printf("Expert z bufetu to vie.\n");
|
|
||||||
tree = read_tree();
|
tree = read_tree();
|
||||||
int count = count_leaves(tree);
|
int count = count_leaves(tree);
|
||||||
|
|
||||||
|
printf("Expert z bufetu to vie.\n");
|
||||||
printf("Pozna %d druhov ovocia a zeleniny.\n", count);
|
printf("Pozna %d druhov ovocia a zeleniny.\n", count);
|
||||||
printf("Odpovedajte 'a' pre prvu moznost alebo 'n' pre druhu moznost.\n");
|
printf("Odpovedajte 'a' pre prvu moznost alebo 'n' pre druhu moznost.\n");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user