From 985756ffaf82fefa14d55f75e64e7e431b455a40 Mon Sep 17 00:00:00 2001 From: Maryna Kravtsova Date: Sun, 22 Nov 2020 17:42:23 +0100 Subject: [PATCH] buffet --- cv8/program.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cv8/program.c b/cv8/program.c index fbe51ec..28275a2 100644 --- a/cv8/program.c +++ b/cv8/program.c @@ -45,10 +45,13 @@ void search(struct tree* this){ printf("Koniec vstupu\n"); exit(0); } - else if(buffer[0] != 'a' || buffer[0] != 'n' || buffer[0] != '\n'){ + if(buffet[0] == '\n'){ + search(this); + } + if(buffer[0] != 'a' || buffer[0] != 'n' || buffer[0] != '\n'){ printf("Nerozumiem\n"); exit(0); - } + } if(buffer[0] == 'a'){ @@ -72,7 +75,7 @@ void search(struct tree* this){ search(this->right); } - search(this); + } void print_tree(struct tree* tree,int offset){