From 8f35e46418e91cf33702b2616920e64e3f049c6b Mon Sep 17 00:00:00 2001 From: Oleksandr Hryshchenko Date: Sun, 7 Mar 2021 00:03:02 +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'a1/program.c'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- a1/program.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/a1/program.c b/a1/program.c index 9d8c5e8..51c46a5 100644 --- a/a1/program.c +++ b/a1/program.c @@ -6,10 +6,10 @@ int main () { char* BMW = (char*) calloc (100, sizeof(char)); int x; - int counter; + int counter = 0; int numbers [100]; for (int i = 0; fgets(BMW, 100, stdin) != NULL; i++){ - if (!strcmp("\n", BMW) || !strcmp(" ", BMW)) { + if (!strcmp("\n", BMW) || !strcmp(EOF, BMW)) { counter = i; break; }