diff --git a/du2/program b/du2/program index e7f8a3b..d2b2e3a 100755 Binary files a/du2/program and b/du2/program differ diff --git a/du2/program.c b/du2/program.c index 92089f8..7360311 100644 --- a/du2/program.c +++ b/du2/program.c @@ -13,13 +13,14 @@ int main(){ if (r == 1){ results[i] = value; if(max < results[i]){ - //printf("Súťažiaci č. %d vypil %d pohárov.\n",i+1,results[i]); max = results[i]; kolvo[a] = i + 1; a = 0; }else if(max == results[i]){ - kolvo[a] = i - 1; - a++; + if(a == 0){ + kolvo[a] = i - 1; + a++; + } kolvo[a] = i; a++; } @@ -40,15 +41,5 @@ int main(){ break; } } - /*do{ - printf("Súťažiaci č. %d vypil %d pohárov.\n",a+1,results[a]); - if(a == i - 1){ - a = first; - printf("Výherca je súťažiaci %d ktorý vypil %d pohárov.\n",a+1,max); - printf("%d %d\n", a, first); - break; - } - a++; - }while(a < i);*/ return 0; }