This commit is contained in:
Andrii Hermaniuk 2022-03-10 18:46:13 +01:00
parent 10e2081a82
commit 16fc5d4803

View File

@ -14,7 +14,7 @@ int main(){
int idx=0; int idx=0;
while (1){ while (1){
int r=scanf("%d",&value); int r=scanf("%d",&value);
if(r!=1||idx==VELKOST_POLA){ if(r!=1||idx==VELKOST_POLA||pole[idx]<0){
break; break;
} }
pole[idx]=value; pole[idx]=value;