This commit is contained in:
Yaroslav Orlianskyi 2022-03-09 15:16:12 +01:00
parent e32a709a68
commit 66f8d275ca

View File

@ -10,8 +10,7 @@ int main(){
while(1){ while(1){
int value = 0; int value = 0;
int r = scanf("%d",&value); int r = scanf("%d",&value);
if (r == 1){ if (r == 1 && r != EOF){
if(r < 0 || r > 1000)
continue; continue;
results[i] = value; results[i] = value;
if(max < results[i]){ if(max < results[i]){