From d659721093c009d6f43740c938cea89bcf86d821 Mon Sep 17 00:00:00 2001 From: Yaroslav Orlianskyi Date: Wed, 9 Mar 2022 15:18:12 +0100 Subject: [PATCH] ASD --- du2/program.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/du2/program.c b/du2/program.c index 2f37244..5c8ca06 100644 --- a/du2/program.c +++ b/du2/program.c @@ -10,7 +10,9 @@ int main(){ while(1){ int value = 0; int r = scanf("%d",&value); - if (r == 1 && r != EOF){ + if(r == EOF) + break; + if (r == 1){ continue; results[i] = value; if(max < results[i]){