From 5b1c508e35a03bb139074762b3849de91f478c33 Mon Sep 17 00:00:00 2001 From: Maryna Kravtsova Date: Sun, 22 Nov 2020 17:36:22 +0100 Subject: [PATCH] buffet --- cv8/program.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/cv8/program.c b/cv8/program.c index ae3b8f2..6efcd97 100644 --- a/cv8/program.c +++ b/cv8/program.c @@ -44,8 +44,7 @@ void search(struct tree* this){ if(r == NULL){ printf("Koniec vstupu\n"); exit(0); - } - else{ + } if(buffer[0] == 'a'){ if(this->left->value[0] == '*'){ printf("%s\n", this->left->value); @@ -66,19 +65,12 @@ void search(struct tree* this){ printf("%s\n", this->right->value); search(this->right); - } - - - - if(buffer[0] == '\n'){ - exit(0); - } - + } if(buffer[0] != 'a' || buffer[0] != 'n'){ printf("Nerozumiem\n"); return; } - } + } void print_tree(struct tree* tree,int offset){