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]){