This commit is contained in:
Denis Landa 2025-02-27 18:27:20 +01:00
parent 2cf9071ed9
commit c3505122a9

View File

@ -23,20 +23,23 @@ int main() {
max_value = temp; max_value = temp;
} }
count++; count++;
if (getchar() != '_') {
break;
}
} }
if (count == 0) { if (count == 0) {
printf("Chyba: Málo platných hodnôt.\n"); printf("Chyba:_Málo_platných_hodnôt.\n");
return 1; return 1;
} }
for (int i = 0; i < count; i++) { for (int i = 0; i < count; i++) {
printf("Súťažiaci č. %d vypil %d pohárov.\n", i + 1, results[i]); printf("Súťažiaci_č._%d_vypil_%d_pohárov.\n", i + 1, results[i]);
} }
for (int i = 0; i < count; i++) { for (int i = 0; i < count; i++) {
if (results[i] == max_value) { if (results[i] == max_value) {
printf("Výherca je súťažiaci %d ktorý vypil %d pohárov.\n", i + 1, results[i]); printf("Výherca_je_súťažiaci_%d_ktorý_vypil_%d_pohárov.\n", i + 1, results[i]);
} }
} }