diff --git a/du2/program.c b/du2/program.c index c8c7ef4..819886d 100644 --- a/du2/program.c +++ b/du2/program.c @@ -14,7 +14,7 @@ int main(){ int idx=0; while (1){ int r=scanf("%d",&value); - if(r!=1||idx==VELKOST_POLA){ + if(r!=1||idx==VELKOST_POLA||pole[idx]<0){ break; } pole[idx]=value;