buffet
This commit is contained in:
parent
727d0e72ee
commit
18b8b31893
@ -54,6 +54,7 @@ void search(struct tree* this){
|
|||||||
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);
|
||||||
|
printf("Koniec\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
printf("%s\n", this->left->value);
|
printf("%s\n", this->left->value);
|
||||||
@ -64,6 +65,7 @@ void search(struct tree* this){
|
|||||||
else if(buffer[0] == 'n'){
|
else if(buffer[0] == 'n'){
|
||||||
if(this->right->value[0] == '*'){
|
if(this->right->value[0] == '*'){
|
||||||
printf("%s\n", this->right->value);
|
printf("%s\n", this->right->value);
|
||||||
|
printf("Koniec\n")
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
printf("%s\n", this->right->value);
|
printf("%s\n", this->right->value);
|
||||||
@ -139,7 +141,7 @@ int main(){
|
|||||||
printf("%s\n", tree->value);
|
printf("%s\n", tree->value);
|
||||||
search(tree);
|
search(tree);
|
||||||
destroy_tree(tree);
|
destroy_tree(tree);
|
||||||
printf("Koniec\n");
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user