From 18b8b3189395723ef349aa0e5237916f064b26b4 Mon Sep 17 00:00:00 2001 From: Maryna Kravtsova Date: Sun, 22 Nov 2020 17:04:45 +0100 Subject: [PATCH] buffet --- cv8/program.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cv8/program.c b/cv8/program.c index 1fa36c1..393e55c 100644 --- a/cv8/program.c +++ b/cv8/program.c @@ -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; }