From ccfc25ac227319221e332ac00c430ef40f6eacb2 Mon Sep 17 00:00:00 2001 From: Oleksandr Hryshchenko Date: Thu, 1 Apr 2021 13:26:01 +0000 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20'du4/program.c'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ^^ --- du4/program.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/du4/program.c b/du4/program.c index 9c92661..9b035ee 100644 --- a/du4/program.c +++ b/du4/program.c @@ -16,7 +16,8 @@ int main(){ bool equals = false; for(int i = 0; fgets(input, 100, stdin) != NULL; i++){ - if(!input || !strcmp(input, "") || input[0] == EOF) break; + if(!input || !strcmp(input, "") || input[0] == EOF || input[0] == '\n' || input[0] == '\0') + break; counter = 0; operation = 0; equals = false;