This commit is contained in:
Matej Hajduk 2025-02-25 14:13:55 +01:00
parent 70ca646c75
commit f0d46eaf96

View File

@ -21,7 +21,7 @@ int main() {
if (pocet == 0) { if (pocet == 0) {
printf("Chyba: Málo platných hodnôt.\n"); printf("Chyba: Málo platných hodnôt.\n");
return 1; return 0;
} }
@ -40,7 +40,14 @@ int main() {
} }
// P // P
printf("Výherca je súťažiaci "); printf(" Výherca je súťažiaci ");
printf("%d" , poz); for( int i = 0; i < pocet; i++){
printf(" ktorý vypil %d pohárov.\n", max); if(vysledky[i] == max){
printf("%d" );
}
}
printf("ktorý vypil %d pohárov.\n", max);
} }