From d3741e5e0c9f689c3fb1a4073a99a7db4777978f Mon Sep 17 00:00:00 2001 From: Vladyslav Korzun Date: Mon, 6 Mar 2023 17:05:09 +0000 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8=D0=BB(?= =?UTF-8?q?=D0=B0)=20=D0=BD=D0=B0=20'du3/program.c'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- du3/program.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/du3/program.c b/du3/program.c index a107eda..dd930f2 100644 --- a/du3/program.c +++ b/du3/program.c @@ -22,6 +22,9 @@ int main(){ while(stop == 0){ r = fgets(riadok,LINE_SIZE,stdin); pos++; + if(feof(stdin)){ + break; + } if (r == NULL || !isdigit(*r) || *r == EOF || feof(stdin)) { //printf("%d", *r); if(*r == 10){