diff --git a/du2/program.c b/du2/program.c index 2ab1a82..a1f4de0 100644 --- a/du2/program.c +++ b/du2/program.c @@ -10,7 +10,7 @@ int main(){ while(1){ int value = 0; int r = scanf("%d",&value); - if (r == 1){ + if (r == 1 && r > 0){ results[i] = value; if(max < results[i]){ max = results[i];