diff --git a/du2/program.c b/du2/program.c index 1dc35c9..37295d9 100644 --- a/du2/program.c +++ b/du2/program.c @@ -18,6 +18,9 @@ int main(){ value = 0; r = scanf("%d", &value); pole[i] = value; + if(value<0){ + return EOF; + } if(r == 1){ i++;