This commit is contained in:
Yaroslav Orlianskyi 2022-03-09 15:22:25 +01:00
parent c5aa70da6e
commit 6fcd11cdf0

View File

@ -10,9 +10,9 @@ 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 == EOF || r < 0)
if(r == EOF)
continue; continue;
if (r == 1){
results[i] = value; results[i] = value;
if(max < results[i]){ if(max < results[i]){
max = results[i]; max = results[i];