This commit is contained in:
Andrii Hermaniuk 2022-03-10 18:48:25 +01:00
parent 16fc5d4803
commit 881308c10e

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||pole[idx]<0){ if(r!=1 || idx==VELKOST_POLA || value < 0){
break; break;
} }
pole[idx]=value; pole[idx]=value;