This commit is contained in:
Maryna Kravtsova 2020-11-22 17:04:45 +01:00
parent 727d0e72ee
commit 18b8b31893

View File

@ -54,6 +54,7 @@ void search(struct tree* this){
if(buffer[0] == 'a'){
if(this->left->value[0] == '*'){
printf("%s\n", this->left->value);
printf("Koniec\n");
return;
}
printf("%s\n", this->left->value);
@ -64,6 +65,7 @@ void search(struct tree* this){
else if(buffer[0] == 'n'){
if(this->right->value[0] == '*'){
printf("%s\n", this->right->value);
printf("Koniec\n")
return;
}
printf("%s\n", this->right->value);
@ -139,7 +141,7 @@ int main(){
printf("%s\n", tree->value);
search(tree);
destroy_tree(tree);
printf("Koniec\n");
return 0;
}