From 66f8d275cab53f5373f25d95f7c34c12a9d9a5be Mon Sep 17 00:00:00 2001 From: Yaroslav Orlianskyi Date: Wed, 9 Mar 2022 15:16:12 +0100 Subject: [PATCH] ASD --- du2/program.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/du2/program.c b/du2/program.c index 21a72a5..85cf3ad 100644 --- a/du2/program.c +++ b/du2/program.c @@ -10,8 +10,7 @@ int main(){ while(1){ int value = 0; int r = scanf("%d",&value); - if (r == 1){ - if(r < 0 || r > 1000) + if (r == 1 && r != EOF){ continue; results[i] = value; if(max < results[i]){