From 6fcd11cdf0b84b1c137c6a768ffa6e4fc0aae3e7 Mon Sep 17 00:00:00 2001 From: Yaroslav Orlianskyi Date: Wed, 9 Mar 2022 15:22:25 +0100 Subject: [PATCH] ASD --- du2/program.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/du2/program.c b/du2/program.c index aec4518..613ad12 100644 --- a/du2/program.c +++ b/du2/program.c @@ -10,9 +10,9 @@ int main(){ while(1){ int value = 0; int r = scanf("%d",&value); + if(r == EOF || r < 0) + continue; if (r == 1){ - if(r == EOF) - continue; results[i] = value; if(max < results[i]){ max = results[i];