buffet
This commit is contained in:
parent
34cfbac698
commit
3e416f3804
@ -41,15 +41,10 @@ void search(struct tree* this){
|
||||
memset(buffer,0,5);
|
||||
char* r = fgets(buffer,5,stdin);
|
||||
|
||||
if(fgets(buffer, 5, stdin) == NULL){
|
||||
if(r == NULL){
|
||||
printf("Koniec vstupu\n");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
/*if(buffer[0] == '\n'){
|
||||
char* r = fgets(buffer,5,stdin);
|
||||
} */
|
||||
|
||||
}
|
||||
if(buffer[0] == 'a'){
|
||||
if(this->left->value[0] == '*'){
|
||||
printf("%s\n", this->left->value);
|
||||
@ -130,10 +125,10 @@ int count_all(struct tree* node){
|
||||
|
||||
int main(){
|
||||
struct tree* tree = NULL;
|
||||
printf("Expert z bufetu to vie.\n");
|
||||
tree = read_tree();
|
||||
int count = count_leaves(tree);
|
||||
|
||||
printf("Expert z bufetu to vie.\n");
|
||||
printf("Pozna %d druhov ovocia a zeleniny.\n", count);
|
||||
printf("Odpovedajte 'a' pre prvu moznost alebo 'n' pre druhu moznost.\n");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user