From 16fc5d48036073cdf80b177ca50b564754d367ec Mon Sep 17 00:00:00 2001 From: Andrii Hermaniuk Date: Thu, 10 Mar 2022 18:46:13 +0100 Subject: [PATCH] funguje --- du2/program.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/du2/program.c b/du2/program.c index c8c7ef4..819886d 100644 --- a/du2/program.c +++ b/du2/program.c @@ -14,7 +14,7 @@ int main(){ int idx=0; while (1){ int r=scanf("%d",&value); - if(r!=1||idx==VELKOST_POLA){ + if(r!=1||idx==VELKOST_POLA||pole[idx]<0){ break; } pole[idx]=value;