From d692f08a9eaa56412374f6d878a1e873af80391b Mon Sep 17 00:00:00 2001 From: Maryna Kravtsova Date: Sun, 22 Nov 2020 17:33:55 +0100 Subject: [PATCH] buffet --- cv8/program.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cv8/program.c b/cv8/program.c index a82b6d8..f3839b5 100644 --- a/cv8/program.c +++ b/cv8/program.c @@ -50,7 +50,7 @@ void search(struct tree* this){ if(this->left->value[0] == '*'){ printf("%s\n", this->left->value); printf("Koniec\n"); - return; + exit(0); } printf("%s\n", this->left->value); search(this->left); @@ -61,7 +61,7 @@ void search(struct tree* this){ if(this->right->value[0] == '*'){ printf("%s\n", this->right->value); printf("Koniec\n"); - return; + exit(0); } printf("%s\n", this->right->value); search(this->right); @@ -70,11 +70,11 @@ void search(struct tree* this){ - if(buffer[0] != '\n'){ + if(buffer[0] == '\n'){ exit(0); } - else{ + if(buffer[0] != 'a' || buffer[0] != 'n'){ printf("Nerozumiem\n"); return; }